Re: Modal window issue
Hi, ModalWindow from wicket-extensions is broken by design, try to use visural-wicket or something different and all your problems are gone. V. 2011/8/9 Archana archanaacharya.adhik...@gmail.com Hi All, In my current application there is a need to open a Modal window with in a Modal window and close the parent Modal window, once the child Modal window opens. Currently from one page on click of a icon the Modal window 1 is opening. Modal window 1 has few other components along with few buttons. On click of a create button another Modal window Modal window 2 opens. 1. The need is to close the Modal window 1 when the Modal window 2 opens. But for Modal window 2, the parent is Modal window 1. So if I close the Modal window 1, Modal window 2 does not open. *Is there a way by which I can close Modal window 1, when Modal window 2 open.* 2. If I can not close the parent Modal window, I want to hide the Modal window 1, when the Modal window 2 open. I tried the setVisible() for Modal window 1. but it did not work. *Is there a way by which I can hide the Modal window 1 or at least deactivate the Modal window 1, when the Modal window 2 opens.* Both the Modal windows uses Panel. I am using wicket 1.4. - Thanks Regards, Archana -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modal-window-issue-tp3731060p3731060.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
Modal window issue
Hi All, In my current application there is a need to open a Modal window with in a Modal window and close the parent Modal window, once the child Modal window opens. Currently from one page on click of a icon the Modal window 1 is opening. Modal window 1 has few other components along with few buttons. On click of a create button another Modal window Modal window 2 opens. 1. The need is to close the Modal window 1 when the Modal window 2 opens. But for Modal window 2, the parent is Modal window 1. So if I close the Modal window 1, Modal window 2 does not open. *Is there a way by which I can close Modal window 1, when Modal window 2 open.* 2. If I can not close the parent Modal window, I want to hide the Modal window 1, when the Modal window 2 open. I tried the setVisible() for Modal window 1. but it did not work. *Is there a way by which I can hide the Modal window 1 or at least deactivate the Modal window 1, when the Modal window 2 opens.* Both the Modal windows uses Panel. I am using wicket 1.4. - Thanks Regards, Archana -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modal-window-issue-tp3731060p3731060.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
Re: Modal window issue
You can do it with javascript. Make a trigger that closes the modalwindow and then opens a new one by firing a new javascript call. Here is an example: final FriendlyAjaxEventBehavior ajaxEventBehavior; add(ajaxEventBehavior = new FriendlyAjaxEventBehavior(JavaScriptConstants.ONCLICK) { @Override protected void onEvent(AjaxRequestTarget target) { showModalWindow(target); } /** * @see org.apache.wicket.behavior.AbstractBehavior#isEnabled(org.apache.wicket.Component) */ @Override public boolean isEnabled(Component component) { return super.isEnabled(component) (!getWorkShiftCellStateController().isInline()) workShiftCellStateController.getWorkShiftDayController().getWorkShiftCellDimensionController().isEditorMode() workShiftCellStateController.isAllowedToModify(); } }); And you can fire it manually: add(fireFriendlyAjaxEventBehavior(ajaxEventBehavior)); /** * @param ajaxEventBehavior * @return GenericTailJavaScriptBehavior */ public GenericTailJavaScriptBehavior fireFriendlyAjaxEventBehavior(final FriendlyAjaxEventBehavior ajaxEventBehavior) { try { return new GenericTailJavaScriptBehavior() { /** * @see com.tustor.common.wicket.behaviors.GenericTailJavaScriptBehavior#getJavaScript() */ @Override public String getJavaScript() { return ajaxEventBehavior.getCallbackScript().toString(); } /** * @see org.apache.wicket.behavior.AbstractBehavior#isTemporary() */ @Override public boolean isTemporary() { return true; } }; } finally { setAdded(null); // Consume it } } ** Martin 2011/8/9 Archana archanaacharya.adhik...@gmail.com Hi All, In my current application there is a need to open a Modal window with in a Modal window and close the parent Modal window, once the child Modal window opens. Currently from one page on click of a icon the Modal window 1 is opening. Modal window 1 has few other components along with few buttons. On click of a create button another Modal window Modal window 2 opens. 1. The need is to close the Modal window 1 when the Modal window 2 opens. But for Modal window 2, the parent is Modal window 1. So if I close the Modal window 1, Modal window 2 does not open. *Is there a way by which I can close Modal window 1, when Modal window 2 open.* 2. If I can not close the parent Modal window, I want to hide the Modal window 1, when the Modal window 2 open. I tried the setVisible() for Modal window 1. but it did not work. *Is there a way by which I can hide the Modal window 1 or at least deactivate the Modal window 1, when the Modal window 2 opens.* Both the Modal windows uses Panel. I am using wicket 1.4. - Thanks Regards, Archana -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modal-window-issue-tp3731060p3731060.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
Modal window issue
I am running into a very odd problem with modal windows. The problem occurs in Firefox and not in IE7. I have a list of links which each display a modal window to create a different type of item. One of the links(call it item A) brings up a modal with the same links so you can create a particular sub-item. All but one of the links displays the modal window correctly from the original list. The link that does not work tries to create a modal window for item D.The link for item D tries to open the modal as a brand new page. However if I click the link for modal A and then from within that click the link for modal D, I get a message Are you sure you want to navigate away from this page. Reloading this page will cause the modal window to disappear. If I click cancel repeatedly then the correct modal window finally displays. I can then go back to the original list of links and click modal D and it all works. Everything works correctly under IE 7. Any ideas? Thanks.