The moose likes JSF and the fly likes Visual Web JSF Navigation issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Visual Web JSF Navigation issue" Watch "Visual Web JSF Navigation issue" New topic

Visual Web JSF Navigation issue

Phoenix Kilimba
Ranch Hand

Joined: Oct 10, 2006
Posts: 64
I have an application whereby content should only be visible via logging in, on login a session object with the users details is created. I want to be able to check (if statement) whether this session object is null and if so, to throw the user back to the login page. My attempt at this was to have a hidden button whose action method returns "fail". I have also set up faces-config.xml to navigate to login when the outcome is "fail". So when the JSP runs, I perform an if statement and if the session variable is empty am trying to simulate a user clicking the button by calling its action method navigateToLoginPurrlease_action() . However I get no joy, is it possible to do it this way? how can one simulate a button being clicked without a user actually clicking it (i.e a hidden button purely for navigation purposes)?

You are what you know
I agree. Here's the link:
subject: Visual Web JSF Navigation issue
jQuery in Action, 3rd edition