Hi, Can someone help me figure out what would be the cause why I am suddenly getting the following error when I close one of my modal windows?
Cannot find behavior with id '0' on component 'org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow:srScreen' in page '[Page class = ums.app.NewSalesReport, id = 2, render count = 3]'. Perhaps the behavior did not properly implement getStatelessHint() and returned 'true' to indicate that it is stateless instead of returning 'false' to indicate that it is stateful. I have a class NewSalesReport where I add the modal window: srScreen = new ModalWindow("srScreen"); srScreen.setTitle("Sales Report Preview"); srScreen.setInitialHeight(500); srScreen.setInitialWidth(800); srScreen.setResizable(false); srScreen.setCssClassName(ModalWindow.CSS_CLASS_BLUE); srScreen.setPageCreator(new ModalWindow.PageCreator(){ private static final long serialVersionUID = 1L; public Page createPage(){ try { srPreviewWindow = new SRPreviewWindow(srScreen, shipmentID, grower.getDefaultModelObjectAsString()); } catch (ClassNotFoundException e) {e.printStackTrace();} catch (SQLException e) {e.printStackTrace();} return srPreviewWindow; } }); srScreen.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target) { try { scp.setContainers(DbQueries.getGrowerUnreportedContainers(dataBase, grower.getDefaultModelObjectAsString())); target.add(scp); } catch (ClassNotFoundException e) {e.printStackTrace();} catch (SQLException e) {e.printStackTrace();} } }); srScreen.setOutputMarkupId(true); add(srScreen); And the window itself SRPreviewWindow: public SRPreviewWindow(final ModalWindow window, final int shipmentID, final String grower) throws ClassNotFoundException, SQLException{ ... add(new AjaxLink("cancel"){ public void onClick(AjaxRequestTarget target) { window.close(target); } }); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/InvalidBehaviorIdException-when-closing-modal-windows-tp4650560.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