Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Matt Kohanek
Village Idiot
Ranch Hand
Posts: 484
Java jQuery Oracle
  • Mark post as helpful
  • send pies
  • 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
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18156
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic