myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "daniel ccss" <>
Subject Simple Question (Action Call from BackingBean init method)
Date Fri, 23 Nov 2007 15:43:05 GMT
I have a simple question

I have been working with myfaces-tomahawk for 6 months, great, but I
have a question, how to call an 'action' from the backing bean, until
today I have called all my action methods from the JSP page, on the
onClick, onChange, etc events, but now I need to call an action from
another method in my backing bean.

I have an init method in my backing bean that ask if the user is in
session, if yes all the load of the combos etc is make, if not I need
to call a method that returns to the login page by returning the
navigation rule like this:

        do the load of the controls

private String returnToLogin(){
      return "login";

and in faces-config.xml i have the navigation rule:



But nothing happens, this type of call can be done?, or only I can
call an action that returns to a navigation rule from the JSP, if so,
how can I send the person to the login page in case he copy the url in
the browser and never pass for the login page.

Thanks all

View raw message