Re: Best way to trap Enter key in a form in a modal window

2012-12-04 Thread Martin Grigorov
Hi Chris, I think all this is actually related to ModalWindow, not to Form. You don't close the Form, you close the ModalWindow. ModalWindow#close() accepts AjaxRequestTarget (ART) so it is clear that it needs to be in Ajax request, no ? The form is just a component in the ModalWindow. With or

RE: Best way to trap Enter key in a form in a modal window

2012-12-04 Thread Chris Colman
Hi Chris, I think all this is actually related to ModalWindow, not to Form. You don't close the Form, you close the ModalWindow. ModalWindow#close() accepts AjaxRequestTarget (ART) so it is clear that it needs to be in Ajax request, no ? The form is just a component in the ModalWindow. With or

Re: Best way to trap Enter key in a form in a modal window

2012-12-04 Thread Martin Grigorov
On Tue, Dec 4, 2012 at 11:31 PM, Chris Colman chr...@stepaheadsoftware.comwrote: Hi Chris, I think all this is actually related to ModalWindow, not to Form. You don't close the Form, you close the ModalWindow. ModalWindow#close() accepts AjaxRequestTarget (ART) so it is clear that it

RE: Best way to trap Enter key in a form in a modal window

2012-12-04 Thread Chris Colman
On Tue, Dec 4, 2012 at 11:31 PM, Chris Colman chr...@stepaheadsoftware.comwrote: Hi Chris, I think all this is actually related to ModalWindow, not to Form. You don't close the Form, you close the ModalWindow. ModalWindow#close() accepts AjaxRequestTarget (ART) so it is clear that it

Re: Best way to trap Enter key in a form in a modal window

2012-12-04 Thread Martin Grigorov
OK, please send a patch for ModalWindow's javadoc. On Wed, Dec 5, 2012 at 1:41 AM, Chris Colman chr...@stepaheadsoftware.comwrote: On Tue, Dec 4, 2012 at 11:31 PM, Chris Colman chr...@stepaheadsoftware.comwrote: Hi Chris, I think all this is actually related to ModalWindow, not to

Re: Best way to trap Enter key in a form in a modal window

2012-12-03 Thread Martin Grigorov
Hi, On Mon, Dec 3, 2012 at 1:05 PM, Chris Colman chr...@stepaheadsoftware.comwrote: I understand that with a form in a modal window you must explicitly declare an AjaxButton component because modal windows require AJAX comms (BTW this should probably be mentioned in the Form Javadoc page

RE: Best way to trap Enter key in a form in a modal window

2012-12-03 Thread Chris Colman
Hi, On Mon, Dec 3, 2012 at 1:05 PM, Chris Colman chr...@stepaheadsoftware.comwrote: I understand that with a form in a modal window you must explicitly declare an AjaxButton component because modal windows require AJAX comms (BTW this should probably be mentioned in the Form Javadoc page

Re: Best way to trap Enter key in a form in a modal window

2012-12-03 Thread Ernesto Reinaldo Barreiro
Hi, On Mon, Dec 3, 2012 at 10:11 PM, Chris Colman chr...@stepaheadsoftware.comwrote: Hi, On Mon, Dec 3, 2012 at 1:05 PM, Chris Colman chr...@stepaheadsoftware.comwrote: I understand that with a form in a modal window you must explicitly declare an AjaxButton component because modal

RE: Best way to trap Enter key in a form in a modal window

2012-12-03 Thread Chris Colman
The other important thing to mention in Form's Javadoc is that a form in a ModalWindow can not be closed without AJAX. i.e. you can't do the close in the standard Form.onSubmit handler as that is given no AjaxRequestTarget parameter which is required to perform the ModalWindow close. Trying to