• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Visual Web JSF Navigation issue

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic