Tried that :) and it always seems to be null.I switched to AjaxButtons, but the problem is that the are fired *after* the form submits, not before as a normal Button is. I'm essentially trying to set a value on the form's model depending on which button was pressed, and then close the ModalWindow on successful submit. There needs to be an easier way to do this... at the moment I'm starting to think I'm going to have to try and attache some javascript that will trigger pre-submit to set some sort of flag... but its getting very dirty.
- Brill On 25-May-09, at 10:48 AM, Jeremy Thomerson wrote:
If all you're saying is that you need to do it from your form's onsubmit, do this:AjaxRequestTarget art = AjaxRequestTarget.get(); if (art != null) { modal.close(art); } Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -----Original Message----- From: Brill Pappin <[email protected]> Sent: Sunday, May 24, 2009 5:36 PM To: [email protected] Subject: Re: closing a ModalWindow from a forms onSubmit? I likely could but am trying to avoid that, because then I have to call it for every button in the form (there are 4 now, all set a state and allow the event to propagate to the forms onSubmit(). Is there no way to know the current context from the component itself? - Brill On 24-May-09, at 5:55 PM, James Carman wrote:Can you submit the form via ajax? On May 24, 2009 2:08 PM, "Brill Pappin" <[email protected]> wrote: I have a form in a model window How do I close the ModalWindow in the form's onSubmit() method without the AjaxRequestTarget? - Brill--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
smime.p7s
Description: S/MIME cryptographic signature
