Anybody?
On Nov 23, 2007 9:43 AM, daniel ccss <[EMAIL PROTECTED]> wrote: > 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: > > //init > { > if(userInSession){ > do the load of the controls > }else{ > returnToLogin(); > } > } > > private String returnToLogin(){ > return "login"; > } > > and in faces-config.xml i have the navigation rule: > > <navigation-rule> > <from-view-id>.... > > <navigation-case> > <from-outcome>login</from-outcome> > <to-view-id>/JSP/Login.jsp</to-view-id> > </navigation-case> > .... > > 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 >