Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to run Controller method when page loads ?  RSS feed

 
Daniel Breitner
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I have a JSF page on which i�d like to call a specific Controller method (config) everytime the page loads.

I tried to do it with an hidden input field but then other methods were executed before my config- method.

How do I tell the page to load a method as the first method on that page ?
 
Bob Good
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Rational Application Developer, you can invoke a method using:
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its a known problem. You can write the code in constructor if your bean is in request scope. If it is in session or application then make use of some getter.

If you find anything better then please let us also know that.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!