On Thu, 12 Feb 2009, Martin Makundi wrote: > 1. I have a form > 2. The form has checkboxes > 3. The form has other fields > > The checkboxes are used to disable specific fields in the form. > Whenever the user changes the checkbox state, I want to use > AjaxEventBehavior or similar to update the form components dependent > on the particular checkbox (just to set them enabled/disabled).
If you repaint the component from the server, and want to retain its input, you have to submit to the server and store it to the model (with a suitable *submittingbehavior) so that it will have the correct value on the repaint. Because the Ajax response content always comes directly from the server it has only access to submitted data. So, if you have one checkbox that toggles several input elements, you must use a behavior that submits the whole form. Another option is to do it purely on the client side -- toggle the input DOM element properties with javascript attached on the correct event handler ("onclick" I think?) of the checkboxes. Your favourite Javascript library (e.g. http://acko.net/files/jQuery%20-%2023%20March%202007.pdf ) can come handy there. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations Oy <URL: http://www.ri.fi/ > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org