-------------- Original message ----------------------
From: PutoDemonio <[EMAIL PROTECTED]>
>
> I'm searching info about how to use v:commonsValidator, something more than
> check a required field or an email, but I don't find anything.
>
> Where can I find something like documentation, and not just a little
> example, always the same "required field" example!!
>
> I'm trying to validate the maxlength of a textArea, and I try something like
> this:
>
> <h:inputTextarea styleClass="text medium" id="description"
> value="#{subsystemForm.subsystem.description}" required="true"
> maxlength="1500">
> <v:commonsValidator type="required"
> arg="#{text['subsystem.description']}" />
> <v:commonsValidator type="maxlength"
> arg="#{text['subsystem.description']}"/>
> </h:inputTextarea>
>
> But I think that I have to set the maxlength value in some parameter in
> v:commonsValidator node...
>
> Please, help! This must be too easy to loose so much time!!!
There are a few examples in the shale usecases app [1].
The shale commons validator was an attempt to add client JavaScript validation
to JSF components. Unfortunately, JSF doesn't really give good framework
support for rich client validators that are not coupled to a JSF component
library. The common validator doesn't work with component libraries like
tomahawk and trinidad because the extension points in shale override extension
points in these libraries. I had hoped that JSF 2.0 would address the issue
but it doesn't look as it will. You are best to stick to validators provided
by the component library you are using.
[1]
http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-usecases/src/main/webapp/validator/test.jsp?view=markup
> --
> View this message in context:
> http://www.nabble.com/v%3AcommonsValidator-maxlength-tp18867067p18867067.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>