Re: Pure client side validation

2008-10-02 Thread harrypitt
Thanks for that solution, To summarize that: - Extend a normal Validator - Add the IValidatorAddListener Interface - Implement the onAdded method - In this method: add a Custom Behavior to the component - In the custom Behavior: Integrate the js like described here:

Re: Pure client side validation

2008-10-02 Thread Nino Saturnino Martinez Vazquez Wael
harrypitt wrote: Thanks for that solution, To summarize that: - Extend a normal Validator - Add the IValidatorAddListener Interface - Implement the onAdded method - In this method: add a Custom Behavior to the component - In the custom Behavior: Integrate the js like described here:

Re: Pure client side validation

2008-10-02 Thread harrypitt
Ok, my question was not clear enough. With Pure client side validation i mean a javascript validation which needs no ajax requests. Of course there should be always a server side validation and the whole default Wicket form-handling AFTER the submit. It would be really stupid to just rely on

Re: Pure client side validation

2008-10-02 Thread Igor Vaynberg
On Thu, Oct 2, 2008 at 12:33 AM, harrypitt [EMAIL PROTECTED] wrote: Thanks for that solution, To summarize that: - Extend a normal Validator - Add the IValidatorAddListener Interface - Implement the onAdded method - In this method: add a Custom Behavior to the component - In the custom

Re: Pure client side validation

2008-10-02 Thread Nino Saturnino Martinez Vazquez Wael
Ahh ok, I get you. So I guess IVisitor would be very good to use here.. Visit every component and put according js validation in there depending on which validator etc... Could be something I would look into at some point.. Maybe the way would be to upgrade the fvalidate integration to

Re: Pure client side validation

2008-10-02 Thread Nino Saturnino Martinez Vazquez Wael
saw this lib: http://yav.sourceforge.net/ maybe it fits better? Nino Saturnino Martinez Vazquez Wael wrote: Ahh ok, I get you. So I guess IVisitor would be very good to use here.. Visit every component and put according js validation in there depending on which validator etc... Could be

Re: Pure client side validation

2008-09-30 Thread pixologe
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

Re: Pure client side validation

2008-09-30 Thread Igor Vaynberg
it is possible, just not there out of the box. can look like something like this class rangejsvalidator extends rangevalidator implements IValidatorAddListener { void onAdded(Component component) { // add some behavior to output javascript validation } } -igor On Tue, Sep 30, 2008 at 12:28