If I understand correctly, this explains the problem but does not
solve it. Anyway, I have a simple workaround to display the message as
a Label or some other component, overriding getModel() to return the
appropriate information. That way I am certain that I am seeing the
correct results.

All it needs to do is display the total number of errors and warnings
with detailed information being on the page. The page offers links to
the user to correct problems and upon returning to the page the total
number of errors and warnings should be updated. In this case I really
want to return to the same page instance because I want the user to
see exactly the same information that he saw before he started
correcting a problem.

Nevertheless, it would be nice if it would be allowed to use info(),
warn(), and error() also in other parts of the lifecycle such as
onAttach() or onBeforeRender(). Without this, it is impossible to
ensure that the correct messages are shown when a user returns to the
same page instance. Requiring a new page instance to show the correct
messages  is a bit restrictive.

On 11/9/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> These methods were introduce specially for situations where you have
> to render messages at some other page than the current. The messages
> are deleted right after they are rendered. Try it, I think it solves
> your problem.
>
> Eelco
>
>
> On 11/9/06, Erik Brakkee <[EMAIL PROTECTED]> wrote:
> > No I didn't because the scope of the messages is of the page only. What
> > would be the correct point in the lifecycle of the page to use warn(),
> > info(), or error()? Apparently I am too early in invoking these methods.
> >
> >
> > On 11/8/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > >
> > > Did you try info/warn/error on Session?
> > >
> > > Eelco
> > >
> > >
> > > On 11/8/06, Erik Brakkee <[EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> > > >
> > > > I am still stuck with this problem. What I try to do is to use info(),
> > > > error(), and warn() to add messages to the page, and I want to do this
> > > > as soon as another page returns to my page using
> > > > setResponsePage(pageObject). Somehow, the messages I set in onAttach()
> > > > or
> > > > onBeforeRender are lost.
> > > >
> > > > Anyone have any ideas on how I should be solving this problem?
> > > >
> > > > Cheers
> > > >   Erik
> > > >
> > > > On 11/1/06, Erik Brakkee < [EMAIL PROTECTED]> wrote:
> > > > > Hi,
> > > > >
> > > > >
> > > > > I have a form from displaying a number of items. The form also
> > displays some
> > > > > validation problems. The user can correct these problems by editing
> > items by
> > > > > clicking on a link and is then forwarded to another page using
> > > > > setResponsePage(...). After editing, the eidt page forwards back to
> > the same
> > > > > instance of the form page.
> > > > >
> > > > > Now I want to do validation as soon as this happens and add messages
> > to the
> > > > > page using info(), warn(), and error(). Nevertheless, I cannot get
> > this to
> > > > > work. I tried overriding onAttach() and onBeforeRender() but
> > apparently my
> > > > > messages are getting lost. What would be the correct way to trigger
> > this
> > > > > validation?  Apparently I am too early in the lifecycle and the
> > messages are
> > > > > being reset after I set them.
> > > > >
> > > > > Cheers
> > > > >   Erik
> > > > >
> > > > >
> > > >
> > > >
> > -------------------------------------------------------------------------
> > > > Using Tomcat but need to do more? Need to support web services,
> > security?
> > > > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > Geronimo
> > > >
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > > > _______________________________________________
> > > > Wicket-user mailing list
> > > > Wicket-user@lists.sourceforge.net
> > > >
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > >
> > >
> > -------------------------------------------------------------------------
> > > Using Tomcat but need to do more? Need to support web services,
> security?
> > > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> > >
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > > _______________________________________________
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> >
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to