The normal way to do something like this is:
//In Listener method of LoginPage:
public void submitListener(IRequestCycle cycle){
PresentationPage p =
(PresentationPage)cycle.getPage("PresentationPage");
p.setUser("LoginUser");
cycle.activate(p);
}
In general, there should be little need to deal with requests, responses, or
sessions. Just use bean attributes
on pages and let tapestry handle it.
Richard
-----Original Message-----
From: supraja sowrirajan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 07, 2005 9:27 PM
To: [email protected]
Subject: Need Help: Communication between Page objects through
IRequestCycle.setAttribute()
Hi,
I need a clarification reg using IRequestCycle.setAttribute(). I have 2
Pages: LoginPage and PresentationPage.
//In Listener method of LoginPage:
public void submitListener(IRequestCycle cycle){
cycle.setAttribute("User", "LoginUser");
cycle.activate("PresentationPage");
}
How and where should I give cycle.getAttribute("User") , in Presentation
Page ? I tried giving in pageBeginRender() method of PresentationPage
but it is giving null. Could you please help?
Thanks much.
Regards,
Supraja.
---------------------------------
Discover Yahoo!
Stay in touch with email, IM, photo sharing & more. Check it out!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]