How can I invoke a method on a managed bean when pressing backbutton or F5?
Share
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.
If the bean is request scoped and the page is served with response headers which instructs the browser to not cache the page, then you can do that job in the bean’s constructor or
@PostConstructmethod.E.g.
The
@PostConstructmethod is particularly useful if you’re injecting dependencies by@ManagedProperty,@EJBor@Inject, etc and want to do the initialization job based on those dependencies.