| Author |
navigate from bean
|
bostian tov
Ranch Hand
Joined: Mar 11, 2010
Posts: 32
|
|
|
I have method that checks if logged on user is admin or not. How can i make redirect in bean, when i know if user is not admin. I have made navigation rule, but dont know how to go further. Thanks
|
 |
Bart Kummel
author
Ranch Hand
Joined: Nov 30, 2007
Posts: 81
|
|
Hi Bostian,
One of the most simple solutions is to have your action method return a String for the desired navigation case. For example, suppose you have the following button:
Then your managedBean should have a method like this:
You should have two navigation cases in your faces-config.xml: adminAction and normalUserAction. Each navigation case should lead to the desired page.
Good luck!
Best regards,
Bart Kummel
|
SCJP 1.4 | SCJD 1.6 | Visit my website | Author of the book Apache MyFaces 1.2 Web Application Development
|
 |
 |
|
|
subject: navigate from bean
|
|
|