Try setWindowClosedCallback(ModalWindow.WindowClosedCallback) Kai
Eyal Golan <mailto:[EMAIL PROTECTED]> wrote: > Hi, > I have a Modal Window that uses a page. > I want that when the user presses OK in the page, there will be a > navigation to a new page and the modal window will be closed. > The navigation should be not in the modal window but in the original > page itself. Here's what I did: > In the page that is the content of the window: > EurekifyAjaxButton okButton = new EurekifyAjaxButton("ok") { > private static final long serialVersionUID = 1L; > > @Override > protected void onError(AjaxRequestTarget target, Form > form) { super.onError(target, form); > target.addComponent(feedbackPanel); } > > @Override > protected void onSubmit(AjaxRequestTarget target, Form > form) { > > *window.setReportSrcUrl(getParametersPairsForReport(), > getReportName());* window.close(target, true); } > > }; > > In the window: > public final void setReportSrcUrl(Map<String, String> > parametersPairsForReport, String reportName) { > if (reportPage == null) { > reportPage = new ReportPage(this, link); > reportPage.setReportSrcUrl(parametersPairsForReport, > reportName); setResponsePage(reportPage); > } else { > reportPage.setReportSrcUrl(parametersPairsForReport, > reportName); } > } > > Where reportPage is a class member. > > I thought about keeping a reference to the page where the link that > opened the popup was. And then do the setResponsePage on it. > > Is there a nicer way? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
