Thanks for the answer. Do you mean that instead of doing the loading of the model in the constructor to do it onAttach() ?
Jonathan Locke wrote: > > > You component is not attached to a parent yet. > You could try doing that work in onAttach(). > > > serban.balamaci wrote: >> >> Hi. >> >> I have a problem in that inside the constructor of a page(panel actually) >> i invoke a stored procedure which needs to get the model for the panel. >> The stored procedure may throw an error message. The error message should >> be seen by the user, he can understand what he did wrong. So inside the >> constructor i have something like this: >> >> public PanelConstructor() { >> try { >> .... >> invoke stored procedure >> ..... >> } catch(UserPresentableException e) { >> error(e.getMessage); >> } >> } >> >> The problem is that if the error is thrown i get a No page found for >> component. I understand that the cause of the error is that the "error >> component" not being instantiated because of the constructor not being >> finished(or i think that's the cause). >> >> Any ideas of solutions that i can implement? >> I know that i could set wicket to production instead of development and >> get rid of the stack trace. The problem is that i would like to keep the >> error message - to show the error message back to the user-. Should i >> instead of doing error(e.getMessage) rethrow the message inside a new >> defined exception and have a custom error page for that exception in >> which i would show only the message of the error. >> >> Is there any option that would keep me from treating the errors in the >> constructor other than how i treat an error from a button push in which i >> do error(e.getMessage())? >> >> Thanks. >> >> >> >> > > -- View this message in context: http://www.nabble.com/error%28...%29-No-page-found-for-component-tf3497125.html#a9772172 Sent from the Wicket - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user