Results 1 to 4 of 4

Thread: faces textarea sf:clientTextValidator

  1. #1
    Join Date
    Oct 2007
    Posts
    17

    Default faces textarea sf:clientTextValidator

    Hi all,

    i'm new to faces technology and i'm trying to build a form using webflow 2.0.3 / faces integration.

    my problem is that if i wrap h:inputTextarea elements with sf:clientTextValidator, i get <input type="textarea" /> rendered. As far as i understand input type="textarea" makes no sense, so textareas are not supported by sf:validator

    the question is - where do i fix sf:clientTextValidator to support textareas correctly?

  2. #2
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    1,224

    Default

    Well, you're definitely doing something wrong if you're getting <input type="textarea"> rendered. The client side validators do not change the child component's rendering in any way. They only output the necessary Spring JavaScript code to decorate the rendered element. I just tried a quick test, and found that the clientTextValidator will in fact apply to a inputTextarea, but not with the result you likely desire. The Dojo component replaces the <textarea> with a more typical input.

    What you really want is the Dojo Textarea component:
    http://api.dojotoolkit.org/jsdoc/dij....form.Textarea

    But we do not have a Spring Faces tag for this yet. Open a Jira to request it if you wish. In the meantime, you could always manually decorate the rendered <textarea> with dijit.form.TextArea using Spring JavaScript directly.
    Jeremy Grelle

    Staff Engineer, Web Products Team
    SpringSource

  3. #3
    Join Date
    Jul 2008
    Location
    Medellín, Colombia
    Posts
    135

    Default

    I'm alson getting strange behavior with sf:clientTextvalidator around a textArea Component because after using that is render as a normal input text..

    :S

    what i'm doing wrong?

  4. #4
    Join Date
    Aug 2008
    Location
    Redmond, WA
    Posts
    14

    Default

    I'm having the same problem. Looks like the sf:clientTextValidator will render its child element as an input.

    I've created a JIRA Issue: http://jira.springframework.org/browse/FACES-52

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •