Hi Harry, 

Well, it should be possible to create a Behavior taking care of stuff
this...

e.g. like 
textField.add(new ClientSideRequiredValidationBehavior(myErrorLabel));

ClientSideRequiredValidationBehavior should override onComponentTag then to
add onchange/onblur javascript code to your input field which updates
myErrorLabel in case of error (or does something else).

You would merely be adding javascript behavior to your input tag then, which
would of course not act like normal wicket validators. And you would have to
implement validation in javascript manually again, which would cause some
redundancy, because there should definitely be server side validation on
form submission as you cannot trust the data coming in from a client.

Hope this helps...
Cheers :)


harrypitt wrote:
> 
> Hi,
> 
> The company I'm working for is evaluating different java-web-frameworks
> and it seems that Wicket or JSF will be the winner (To be honest, my
> personal opinion is that Wicket is the far better choice). In this
> evaluation i have to make sure if the framework supports pure (java
> script) client side validation.
> 
> As far as i know Wicket "only" supports client side validation with ajax
> requests. This solution is not satisfying for us, because we want to use
> the framework to create huge forms which are used by many people. And we
> think it would be a hard job for our servers to process all that requests.  
> 
> My question: Is it possible to create light weight validators (like
> required validator) that are working with java script and act like normal
> wicket validators:  
> 
> textField.add(new ClientSideRequiredValidator());
>   
> I know that this topic was discussed in the mailing list many times, but i
> haven't found a real solution for this.  
> 
> Harry
> 
>  
> 

-- 
View this message in context: 
http://www.nabble.com/Pure-client-side-validation-tp19737383p19740821.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to