Well, first off, be careful about setActivatedUser that it doesn't store the
user directly in the Global because global is just that, global across all
users. I assume that the setActivatedUser is calling out to hivemind,
hibernate, spring, or some other back end process. Secondly, we need more
info, like what version of Tapestry you are using (4.0 Beta 4, 3.0.3, etc).
Also did you try debugging the code and is the value of user == null or
actually contain a value. Also what interfaces and classes does your
service implement (only really interested in the Tapestry specific ones).
----- Original Message -----
From: "Oleksandr Yuzikov" <[EMAIL PROTECTED]>
To: "Tapestry users" <[email protected]>
Sent: Monday, August 22, 2005 1:09 PM
Subject: Page activation in AbstractService problem
Hi, respected tapestry users.
I want to activate "success" page after the user activation service
performed. But I get blank page there. Any suggestions about this issue?
public void service(IEngineServiceView view, IRequestCycle cycle,
ResponseOutputStream out) throws ServletException, IOException {
String context[] = getServiceContext(cycle.getRequestContext());
String username = context[0];
String key = context[1];
Global glob = (Global)cycle.getEngine().getGlobal();
User user = glob.getUserManager().activate(username, key);
if (user != null){
glob.setActivatedUser(user);
UserActivationSuccess page =
(UserActivationSuccess)cycle.getPage("UserActivationSuccess");
page.setUser(user);
cycle.activate(page);
} else {
cycle.activate("UserActivationFailed");
}
}
Thanks.
-- Oleksandr Yuzikov
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]