WORedirect
WORedirect
- Subject: WORedirect
- From: Erwin <email@hidden>
- Date: Sun, 12 Dec 2004 18:54:45 +0100
I tried to modify the authentification scheme of my app using the the recommandation from Practical WebObjects (chap 4)
so after authentification, I detect the user type (admin, member, agent, visitor) then I need to display the corresponding type component HomePage
I succeeded but only using redirection (as stated in the book) not using component page....
how I can redirect to a component page.... ?
I believe I should use
context().componentActionURL
but how to redefine the nextPage ? ('AdminHomePage in my case...)
Login class
........
String userType = ((Session)session()).authenticatedUser().entityName();
if (userType.equals("Administrator")) {
insecurePostLoginActionUrl = "http://" +
WORequestAdditions.hostName(context().request()).context().directActionURLForActionNamed("adminLogin", null);
nextPage = (WORedirect) pageWithName("WORedirect");
((WORedirect) nextPage).setUrl(insecurePostLoginActionUrl);
}
.....
DirectAction class
public WOActionResults adminLoginAction() {
return pageWithName("AdminHomePage");
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden