That's the one.

On 4/24/09, Jason Wang <[email protected]> wrote:
> Liam Clarke-Hutchinson wrote:
>> I use an AjaxFormComponentSubmittingBehavior onblur for each field -
>> so it triggers the submission processing behaviour (including
>> validation) for the given field - although it updates the model. You
>> could use an applicable Ajax behaviour and then call the component's
>> validate() method if you wanted to avoid the model update.
>>
>> Regards,
>>
>> Liam Clarke
>>
>> On Fri, Apr 24, 2009 at 3:50 PM, Jason Wang <[email protected]>
>> wrote:
>>
>>> Hi all,
>>>
>>> I have a form with a couple form components, most of which have
>>> validators
>>> attached. For example, the mobile number input field has a
>>> patternValidator
>>> attached:
>>>
>>> mobile.add(new PatternValidator("^[1-9]([0-9]{8,14})"));
>>>
>>> I have hooked all the validation actions with "onblur" events using this:
>>>
>>> AjaxFormValidatingBehavior.addToAllFormComponents(signUpForm, "onblur",
>>> Duration.ONE_SECOND);
>>>
>>> But unfortunately all the validations are triggered as soon as the focus
>>> leaves any of the form component.
>>>
>>> Is there a way to hook the validator(like the patterValidator) with the
>>> event(onblur for example) on the form component(the mobile filed) rather
>>> than the whole form?
>>>
>>> It would be nice that the AjaxFormValidatingBehavior class could provide
>>> the
>>> option to trigger the validations on events on every components.
>>>
>>> Thanks.
>>>
>>> Jasonw
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
> Thanks for the reply. I think you meant
> "AjaxFormComponentUpdatingBehavior
> <http://wicket.apache.org/docs/1.4/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.html>".
>
> I will give it a try. Any other options to discuss?
>
> Regards,
> Jasonw
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to