With (2) and (3), what is the best way of handling validation?

With (1), the server-side state for the form is correct, and the hidden component won't be validated on form submit.

With (2) and (3), the "visible" state of the toggled component is purely client side. This means that on form submit, the hidden component will still be validated.

Pedro Santos wrote:
2 or 3 since there is no relevant state on the server side you want to
consider to implement the component visibility rule.

On Tue, Jun 1, 2010 at 7:37 AM, Iain Reddick
<iain.redd...@beatsystems.com>wrote:

Say I have a form with a check box that, when checked, shows some other
field (i.e. it controls the visibility of other form components).

What is the best approach to handling this?

From what I understand, you have 3 options:

1. Add ajax behaviour to the check box (re-render relevant components).
2. Add javascript from the Java code (e.g. add some kind of show/hide
behaviour).
3. Add javascript directly to the HTML.

What are peoples experiences of the 3 methods, and which is best?

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






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

Reply via email to