tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Greene" <agre...@romulin.com>
Subject RE: Page state & Visit class question
Date Wed, 27 Aug 2003 12:54:03 GMT
The simplest thing to do is put that code into the beginResponse method.

-----Original Message-----
From: VincePlatt@comcast.net [mailto:VincePlatt@comcast.net]
Sent: Tuesday, August 26, 2003 9:39 PM
To: Tapestry users
Subject: Page state & Visit class question

I have a (hopefully) easy question for everyone...

I currently have my user's state within the application being stored within
Visit class.  To my knowledge, that is the proper usage of a Visit class
(correct?).  Ok.. given that then, I'm trying to retrieve a value out of the
Visit class that was previously set in another page.  Currently, I'm
to do that in that page's constructor because I need the value right away to
the correct data from the database.  That doesn't currently work, because
only way I know of to retrieve the Visit class is using the page's
this.getPage().getVisit() or this.getEngine().getVisit() and those do not
in the constructor because this isn't set yet.

So, the short question is, how do I retrieve my value from the Visit class?
The longer question is, am I using the correct technique with the Visit
etc?  Should I be doing this in a different way.  I'm really going to have a
of inter-page state going on in the future, so this will be a crucial area
for us.

Thanks a bunch in advance!

Here's a code snippet of the constructor to clarify:

  public DealerEditPage() {
    AutowiseVisit visit;
    int currentOrgID;

    visit = (AutowiseVisit) this.getPage().getVisit(); //BOOM!
    currentOrgID = visit.getCurrentDealerID();

To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org

View raw message