I'm not entire sure what you want to achive. This example is to open a new window that extends WebPage. You don't need to call setContent.
public class HomePage extends WebPage { private static final long serialVersionUID = 1L; private String content; // This is a variable to hold the search result public HomePage(final PageParameters parameters) { Form<Void> form = new Form<Void>( "form" ); final TextField<String> field = new TextField<String>( "field" ); form.add( field ); // Create modal window final ModalWindow window = new ModalWindow( "window" ); window.setPageMapName("window-1"); window.setCookieName("window-1"); window.setPageCreator(new ModalWindow.PageCreator() { private static final long serialVersionUID = 1L; public org.apache.wicket.Page createPage() { return new MyWebPage( content ); // A new Page with the search result } }); window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { private static final long serialVersionUID = 1L; public void onClose(AjaxRequestTarget target) { } }); window.setCloseButtonCallback(new ModalWindow.CloseButtonCallback() { private static final long serialVersionUID = 1L; public boolean onCloseButtonClicked(AjaxRequestTarget target) { return true; } }); add( window ); AjaxSubmitLink submit = new AjaxSubmitLink( "submit" ){ @Override protected void onSubmit(AjaxRequestTarget target, Form<?> form) { content = field.getDefaultModelObjectAsString(); window.show( target ); } }; form.add( submit ); add( submit ); } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/modalWindow-setContent-tp2714385p2714624.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org