Win a copy of TDD for a Shopping Website LiveProject this week in the Testing 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:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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: 25456
178
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.
 
We must storm this mad man's lab and destroy his villanous bomb! Are you with me tiny ad?
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic