Re: Checkbox OnChangeAjaxBehavior with defaultFormProcessing=false??

2009-04-27 Thread Martin Makundi
Ahh, now I know. I just need to make FormSubmittingCheckBox implements IFormSubmittingComponent and then checkBox.add(new AjaxFormSubmitBehavior(onchange)). Yippee! ** Martin 2009/2/13 Timo Rantalaiho timo.rantala...@ri.fi: On Fri, 13 Feb 2009, Martin Makundi wrote: Yes, this is what I am

Re: Checkbox OnChangeAjaxBehavior with defaultFormProcessing=false??

2009-04-27 Thread Martin Makundi
Actually one must hack even further to reject the submitButton=1 value being added at form submit javascript: /** * wicket-ajax: * * if (submitButton != null) { * s += Wicket.Form.encode(submitButton) + =1; * } * * @see

Re: Checkbox OnChangeAjaxBehavior with defaultFormProcessing=false??

2009-02-13 Thread Timo Rantalaiho
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

Re: Checkbox OnChangeAjaxBehavior with defaultFormProcessing=false??

2009-02-13 Thread Martin Makundi
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. Yes, this is what I am trying to do, but disabling and enabling a

Re: Checkbox OnChangeAjaxBehavior with defaultFormProcessing=false??

2009-02-13 Thread Timo Rantalaiho
On Fri, 13 Feb 2009, Martin Makundi wrote: Yes, this is what I am trying to do, but disabling and enabling a textfield ends up clearing its value too if I use AjaxFormSumitBehavior. Don't know why. Maybe a conversion error that prohibits updating the model? Though in the case of validation or

Re: Checkbox OnChangeAjaxBehavior with defaultFormProcessing=false??

2009-02-13 Thread Martin Makundi
Maybe a conversion error that prohibits updating the model? I do not want to update the model. I want defaultFormProcessing=false with the particular ajax event. In a way, yes, but sometimes purely client-side stuff can be easier purely on the client-side. The functionality is already in

Re: Checkbox OnChangeAjaxBehavior with defaultFormProcessing=false??

2009-02-13 Thread Martin Makundi
I could actually hack this feature by adding an AjaxButton onto the page which has defaultFormProcessing=false and then hide that button using css/style and always invoke that button when a checkbox is clicked. But it would be betterto just make sure Wicket supports such events for FormComponents.

Checkbox OnChangeAjaxBehavior with defaultFormProcessing=false??

2009-02-12 Thread Martin Makundi
Hi! My problem: 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