Ok, I see.

        public final void error(final Serializable message)
        {
                getPage().getFeedbackMessages().error(this, message);
        }

Why don't we fix this?

Eelco


On 3/31/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> it works fine because you are calling error on a page and not on a
> component. errors are stored at page-level.
>
> -igor
>
>
>
> On 3/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> >
> > Weird problem. Can you give us a stack trace please? I tried this:
> >
> > Index:
> /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/helloworld/HelloWorld.java
> >
> ===================================================================
> > ---
> /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/helloworld/HelloWorld.java
>        (revision
> > 524461)
> > +++
> /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/helloworld/HelloWorld.java
>        (working
> > copy)
> > @@ -17,7 +17,7 @@
> > package wicket.examples.helloworld ;
> >
> > import wicket.examples.WicketExamplePage;
> > -import wicket.markup.html.basic.Label;
> > +import wicket.markup.html.panel.FeedbackPanel;
> >
> > /**
> >   * Everybody's favorite example!
> > @@ -31,6 +31,7 @@
> >          */
> >         public HelloWorld()
> >         {
> > -               add(new Label("message", "Hello World!"));
> > +               error("test");
> > +               add(new FeedbackPanel("message"));
> >         }
> > }
> > \ No newline at end of file
> >
> > And that works fine...
> >
> > Eelco
> >
> >
> > On 3/31/07, serban.balamaci <[EMAIL PROTECTED]> 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 {
> > >       } 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?
> > >
> > > Thanks.
> > >
> > >
> > >
> > > --
> > > View this message in context:
> http://www.nabble.com/error%28...%29-No-page-found-for-component-tf3497125.html#a9767935
> > > 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
> > >
> >
> >
> -------------------------------------------------------------------------
> > 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
> >
>
>
> -------------------------------------------------------------------------
> 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
>
>

-------------------------------------------------------------------------
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

Reply via email to