Re: ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem
Why AjaxButton works inside the modal window ModalEditPanel but Button not works for the Form submit? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem
modalEditLog.setContent(new ModalEditPanel(modalEditLog.getContentId(), modalEditLog, result)); modalEditLog.setWindowClosedCallback(new WindowClosedCallback() { private static final long serialVersionUID = 7961678233294274184L; public void onClose(AjaxRequestTarget target) { doRefresh(target); } }); Panel ModalEditPanel is the replacement for the original WebPage ModalEditPage and it has the close button to close the window addOrReplace(new AjaxLink("btnClose") { private static final long serialVersionUID = -8174543450190822811L; @Override public void onClick(AjaxRequestTarget target) { window.close(target); } }); -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem
Please share how you solved it. Someone else may hit the same issue some day and your explicit description will help him/her. Just confirming "ModalWindow#setContent() solved it" is also fine. On Thu, Mar 7, 2019 at 11:52 AM kyc wrote: > Solved. Thank you. > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem
Solved. Thank you. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem
Hi, It seems you use ModalWindow backed by a Page, i.e. you use ModalWindow's PageCreator. Try with ModalWindow backed by a Panel (ModalWindow#setContent()). On Thu, Mar 7, 2019 at 9:57 AM kyc wrote: > Hi Bas, > > Thanks for your reply. > > Since we are saving data in the page of Modal Page itself, it is no > problem. > However, we have problem to close that modalwindow with a separate close > button. > Even I change the form to StatelessForm, the close button still have the > PageExpiredException > > addOrReplace(new AjaxLink("btnClose") { > private static final long serialVersionUID > = -8174543450190822811L; > > @Override > public void onClick(AjaxRequestTarget target) { > window.close(target); > } > }); > > KYC > > > > > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem
Hi Bas, Thanks for your reply. Since we are saving data in the page of Modal Page itself, it is no problem. However, we have problem to close that modalwindow with a separate close button. Even I change the form to StatelessForm, the close button still have the PageExpiredException addOrReplace(new AjaxLink("btnClose") { private static final long serialVersionUID = -8174543450190822811L; @Override public void onClick(AjaxRequestTarget target) { window.close(target); } }); KYC -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem
Hi, Since you are not storing pages, how does the form in your modal window work? I assume you are using a stateless form? Since your on close callback is stateful, it will not work; you will either need to use a stateless Ajax behavior or stateless form where in onsubmit you redirect to a new page with up-to-date information. // Bas Verstuurd vanaf mijn iPhone > Op 7 mrt. 2019 om 07:56 heeft kyc het volgende geschreven: > > Our page open a WindowModal for editing a form, there is an exception throw > when closed the modal window. > This problem only happens when our site is using NoPageStore but we have to > use NoPageStore. > > The following exception happen and the setWindowClosedCallback cannot be > called. > Page with id '16' has expired. > org.apache.wicket.protocol.http.PageExpiredException: Page with id '16' has > expired. > > > The modal window close call back function works on without NoPageStore > setting: > >abcModalWindow.setWindowClosedCallback(new WindowClosedCallback() { >private static final long serialVersionUID = > 7961678233294274184L; > >public void onClose(AjaxRequestTarget target) { >doRefresh(target); >} >}); > > Please help if anyone knows the solution. Thanks a lot. > > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem
Our page open a WindowModal for editing a form, there is an exception throw when closed the modal window. This problem only happens when our site is using NoPageStore but we have to use NoPageStore. The following exception happen and the setWindowClosedCallback cannot be called. Page with id '16' has expired. org.apache.wicket.protocol.http.PageExpiredException: Page with id '16' has expired. The modal window close call back function works on without NoPageStore setting: abcModalWindow.setWindowClosedCallback(new WindowClosedCallback() { private static final long serialVersionUID = 7961678233294274184L; public void onClose(AjaxRequestTarget target) { doRefresh(target); } }); Please help if anyone knows the solution. Thanks a lot. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org