• 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

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: 27764
196
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.
 
no wonder he is so sad, he hasn't seen this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic