That's just a server round-trip on client-side state changem, which is
basically (1) in my initial list.
Basically, this type of form behaviour is very common and the question
of how to implement it with Wicket has been raised by every developer I
know who has worked with the framework.
I know that Wicket generally works best when you round-trip client-side
state changes to the server, but I think that in this situation it is
silly, as the submitted form contains all the required state.
Jeremy Thomerson wrote:
return true from wantOnSelectionChangedNotifications and put your visibility
changing code in onSelectionChanged
<http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/CheckGroup.html#wantOnSelectionChangedNotifications()>
http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/CheckGroup.html#wantOnSelectionChangedNotifications()
On Tue, Jun 1, 2010 at 5:37 AM, Iain Reddick
<[email protected]>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: [email protected]
For additional commands, e-mail: [email protected]