Hello.
I am trying to open a popup in onSubmit() of a form.
The form is simple: it has a TextField and a Button.
When it is submitted the value from the TextField shall become a
PageParameter for the popup and it shall be used in PageMap.forName(...) as
identifier (so for equal values the created Pages are loaded in the same
popup).
I only know how to open a Popup in a static way - with a Link that knows at
Page creation time what popup it should load and with which PageParameters.
I came up with something like that:
Form form = new Form("form")
{
protected void onSubmit()
{
PopupSettings popupSettings = new PopupSettings(PageMap.forName("id_"
+ textField.getConvertedInput())).setHeight(768).setWidth(1024);
System.out.println(popupSettings.getPopupJavaScript());
PageParameters parameters = new PageParameters();
parameters.add("id", (String)textField.getConvertedInput());
// TODO ** open the Popup here with the pageParameters
}
};
But I don't know if this is even the right direction.
Is this even possible?
regards Thomas
--
View this message in context:
http://www.nabble.com/How-to-open-a-popup-in-onSubmit%28%29-of-a-Form-tp14435932p14435932.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]