andruhon commented on issue #375: WICKET-6666 modal dialog URL: https://github.com/apache/wicket/pull/375#issuecomment-557295536 It seems like this popup does what's needed and is simple enough. > That's just AjaxNewWindowNotifyingBehavior creating a new page instance when it detects that you open a page in two different browser tabs. This is a really annoying behavior. It's, probably, outside of the demo scope, but it would be nice to have this link working with a new tab. Maybe somewhat like this ``` Index: wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalDialogPage.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalDialogPage.java (revision 5b01f231b7cf56b389596efd004bf1e800fe25c3) +++ wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalDialogPage.java (date 1574374168753) @@ -46,8 +46,8 @@ */ public class ModalDialogPage extends BasePage { - - private AjaxListPanel stackedDialogs; + private final ModalFragment modalFragment; + private final AjaxListPanel stackedDialogs; /** * Should dialogs be stacked rather than nested @@ -69,12 +69,18 @@ queue(new Radio<Boolean>("yes", Model.of(true))); queue(new Radio<Boolean>("no", Model.of(false))); - queue(new ModalFragment("start")); + modalFragment = new ModalFragment("start"); + queue(modalFragment); stackedDialogs = new AjaxListPanel("stackedDialogs"); queue(stackedDialogs); } + private ModalDialogPage widthDialog() { + modalFragment.openDialog(null); + return this; + } + @Override public void renderHead(IHeaderResponse response) { @@ -116,7 +122,7 @@ @Override public void onClick() { - openDialog(null); + setResponsePage(new ModalDialogPage().widthDialog()); } }); ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services