Working with JSF 2.0 (and Primefaces), is there a way to fire an ActionListener when a page is loaded?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depends of your need, for example you can use
f:eventwithpreRenderViewif you want to initliaze something in your bean:Check this link :
http://www.mkyong.com/jsf2/jsf-2-prerenderviewevent-example/
But you should know that the event is call on every requests : ajax, validation fail …. You can check if it’s new request like this: