This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

is there a good way to trigger bean, render page, and trigger bean again in one action?

 
Village Idiot
Posts: 484
jQuery Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey all

When a user clicks a login button, I need to trigger the java to do that login.

Then if the user successfully logs in, I need to render the page as needed. Easy enough of course.

But I would like to add another step into that. After the page is rendered, I would like to trigger yet another java bean method. All originating with that login button click. Of course I could have the bean fire upon this render happening. However, there are other actions that could cause this partial page render to occur other than the login click, and I do no want this extra set of actions to occur int hat case.

Hope this makes sense. This is more to put out feelers for any tips for this right now, I will hope to have more details as I work on this more.
Thanks
 
Saloon Keeper
Posts: 24540
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, Matt, by now I thought you'd know what I have to say to people who try and roll their own login/security systems.

If you write your own login code, it's virtually certain that someone is going to pwn you.

Security lectures notwithstanding, however, you cannot add user logic to the render phase of the JSF lifecycle. The architecture is designed to render based on an immutable copy of the Model. The closest you can get is to use render-control options on the View definition such as the "rendered=" and style attributes.

Also, "after the page is rendered", the server disconnects from the client, so nothing further can be done until the client connects again with another request.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic