Hello,

A question about form processing: is it possible to do conditional form 
validation without overriding FormComponent#isRequired?

I have a form with about 5 different form components (e.g. textfields, 
dropdown, radiobutton). These fields are only required if a RadioGroup has a 
certain value.

I've read the solution given in 
https://cwiki.apache.org/WICKET/conditional-validation.html. But this means I 
have to subclass all form components  and override isRequired. Is there an 
easier solution?

Currently I'm using an Ajax call and disable the container of the optional 
components, however that doesn't work if Javascript is disabled (also not safe 
presumably).

Best regards,

Bob



Think green - keep it on the screen.

This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.

Reply via email to