How to open an external web page from a Wicket modal dialog -
i have modal dialog in wicket contains link. need open external web page (for example, http://www.google.com) clicking on link. target of link set dynamically. how can this?
i think question hasn't been clear(i apologize that). need open web page modal dialog. actually, can explain problem in example of modal dialog @don roby has proposed me (wicketstuff.org/wicket14/ajax/modal-window.0). if click "show modal dialog page" link in example, there shown modal dialog link called "open modal dialog". clicking on link, want open web page (for example: www.google.com). question is: how open web page in situation?
you can use pagecreator (instead of setcontent()), , return redirectpage:
modalwindow modal = new modalwindow("modal"); modal.setpagecreator(new modalwindow.pagecreator() { @override public page createpage() { return new redirectpage("http://www.google.com"); } }); add(modal);
Comments
Post a Comment