You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Thomas Kappler <tk...@googlemail.com> on 2008/01/22 16:02:29 UTC

Get from input from a ModalWindow

Hi,

I have a ModalWindow with a form, having some dropdown choices and
text fields.  It should be simple, but I can't get the user input when
the window is closed.  There is no domain model object behind the
form, I just need a list of Strings from the form, although I could,
of course, make up a wrapper POJO for that.

I found the example on
http://cwiki.apache.org/WICKET/pass-form-input-from-modal-window-back-to-the-caller-page.html,
but I'm not sure I get it.  Is chooserPanel the modal window?  If so,
how and when is yourValue set?  Via the form's onSubmit, I guess, but
when is that triggered?

Thanks,
Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Get from input from a ModalWindow

Posted by Thomas Kappler <tk...@googlemail.com>.
Hi Stefan,

it was indeed a problem with the models involved there.  It looked
fine to me, so I suspected the modal window, and that wiki page I
linked also gave me the impression that there was something with modal
windows in that regard, but I should have checked first in an ordinary
page.

Thanks!
Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Get from input from a ModalWindow

Posted by Stefan Lindner <li...@visionet.de>.
Hi Thomas,

you have a form inside your ModalWindow. There is no difference between a form in a ModalWindow and a form in a normal Window. You have to associate your form with a model or each component of your form has it's own model.
How do you submit the form? With a form button? Or do you simply close the ModalWindow with the close button?
Generally you can use a Model for your ModalWindow and override the windowclose method in your caller window.
E.g. you have window A with a ModalWindow mw. You open your ModalWindow with the mw.show() command.
Then cou can override mw.setWindowClosedCallback... and there cou can access the Model of the Modalwindow.

Stefan

-----Ursprüngliche Nachricht-----
Von: Thomas Kappler [mailto:tkappler@googlemail.com] 
Gesendet: Dienstag, 22. Januar 2008 16:02
An: users@wicket.apache.org
Betreff: Get from input from a ModalWindow

Hi,

I have a ModalWindow with a form, having some dropdown choices and text fields.  It should be simple, but I can't get the user input when the window is closed.  There is no domain model object behind the form, I just need a list of Strings from the form, although I could, of course, make up a wrapper POJO for that.

I found the example on
http://cwiki.apache.org/WICKET/pass-form-input-from-modal-window-back-to-the-caller-page.html,
but I'm not sure I get it.  Is chooserPanel the modal window?  If so, how and when is yourValue set?  Via the form's onSubmit, I guess, but when is that triggered?

Thanks,
Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org