Hi, I am unable to addres this need and have to ask the group.

I am using the ajax approach to validate each field on a form. See the 
following:

<div wicket:id="fullNameBorder">
<input type="text" wicket:id="fullName" />
</div>

If the above field gets focus and loses the focus without any value in it, 
there will be a red box around the input field. If it gets a value and loses 
its mouse focus, the red box disappears. All this happens without the user 
submitting the form.

The backend code is similar to the following:

...
inputComponent.add(new AjaxFormComponentUpdatingBehavior("onblur") {

@Override
protected void onUpdate(AjaxRequestTarget target) {
if (target != null) {
//add border and feedback panel here
}
}

@Override
protected void onError(AjaxRequestTarget target, RuntimeException e) {
if (target != null) {
//add border and feedback panel here
}
}); 
....

This approach works well for TextFields. 

Now I have a list of check boxes (implemented via CheckBoxMultipleChoice). At 
least one of them must be checked. The above Ajax approach is NOT working.

Can anybody there help me out on this?

All the best.


      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to