howzat wrote:
> Al, that is a very helpful reply, thank you!

No problem. ;-)

> Yes, I have a lot to learn about wicket, but I know a lot more than I did a
> few days ago, and I like it so far.

Great!

> In my particular case, the page in question is the HomePage, so, since the
> user has already been there on her way to Page2, I suppose I will always
> need to create a new instance if I want to show an alert (for example) as
> the HomePage is visited from Page2's submit (eg user saved some data entered
> on a Page2 form by hitting submit).
> I acheived this, albeit by dubious methods (as you kindly pointed out), by
> including an alert in the <head> of the HomePage if the constructor that
> takes a message (eg HomePage(String successMessage)) is called using a
> StringHeaderContributor.
> I suppose I need to review this.
> On the other hand, it is still a useful learning exercise, either way, and I
> will now study your post in detail before I try again, cheers.

If you wish, you can pass the home page into your Page2.

add(new Link("someId") {
    public void onClick() {
        setResponsePage(new Page2(HomePage.this));
    }
});

And take the Page arg in Page2's constructor.
That way, you have a reference to it, and can link back to that.

It's probably better to do status alert type stuff using Wicket's
FeedbackPanel (if it's for a form) or via some other Session-based
mechanism, though.

Have fun playing.

Regards,


Al

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to