Re: Submit form before handle onclick

2013-02-18 Thread Martin Grigorov
Hi, Use org.apache.wicket.ajax.form.AjaxFormSubmitBehavior#onAfterSubmit if you want to execute something *after* Form#onSubmit() On Sun, Feb 17, 2013 at 8:15 PM, Gonzalo Aguilar Delgado gagui...@aguilardelgado.com wrote: Hello Sven, Yes. I added this to the form, and a eventhandler to the

Re: Submit form before handle onclick

2013-02-18 Thread Gonzalo Aguilar Delgado
Hi Martin, Ok. I will take a look to this but I think it's not the right solution. Suppose this: - PAGE Example| --- A - This is a form. | B - This is a form.|

Re: Submit form before handle onclick

2013-02-18 Thread Martin Grigorov
Hi, I think this is not possible if you use two root forms. You need to submit them by order (first A and then B) to have the values. You can use nested forms though. B should be inside A. This way when you submit B Wicket will post all the data (for both A and B) but will process only form B.

Re: Submit form before handle onclick

2013-02-18 Thread Gonzalo Aguilar Delgado
Hi Martin, Thank you for your answer. What about doing like google and others? I mean save (submit) on lost focus... So the model will get updated every time you leave a field. Any good references? thank you. El lun, 18-02-2013 a las 11:02 +0200, Martin Grigorov escribió: Hi, I think

Re: Submit form before handle onclick

2013-02-18 Thread Ernesto Reinaldo Barreiro
Hi, On Mon, Feb 18, 2013 at 11:45 AM, Gonzalo Aguilar Delgado gagui...@aguilardelgado.com wrote: Hi Martin, Thank you for your answer. What about doing like google and others? I mean save (submit) on lost focus... So the model will get updated every time you leave a field. Isn't this a

Re: Submit form before handle onclick

2013-02-18 Thread Martin Grigorov
I thought you don't want form A to be submitted and its model updated. Otherwise why you have two forms ? Otherwise use what Ernesto suggested - AjaxFormComponentUpdatingBehavior for each 'required' component of form A. On Mon, Feb 18, 2013 at 12:50 PM, Ernesto Reinaldo Barreiro

Re: Submit form before handle onclick

2013-02-17 Thread Gonzalo Aguilar Delgado
Hello Sven, Yes. I added this to the form, and a eventhandler to the button, but the event handler of the button is always called before the submit. The problem is that I cannot process the onclick handler of the button without the information of the form. So I think I need to submit it on

Submit form before handle onclick

2013-02-15 Thread Gonzalo Aguilar Delgado
Hello, We have just a situation were the information of the form needs to be updated before handling an ajax click event. The page has a form, with a bean and some TextFields that update the properties in the bean. It has also an ajax component that also updates the bean. The problem is

Re: Submit form before handle onclick

2013-02-15 Thread Sven Meier
Use AjaxFormSubmitBehavior with #setDefaultProcessing(false). Sven On 02/15/2013 11:01 AM, Gonzalo Aguilar Delgado wrote: Hello, We have just a situation were the information of the form needs to be updated before handling an ajax click event. The page has a form, with a bean and some