Is it possible to “disable” triggering of this action when doing postback?
<f:metadata>
<f:event listener="#{defaultNewQuestionHandler.init}" type="preRenderView" />
</f:metadata>
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.
That’s not possible with
<f:event>. You need to manually checkFacesContext#isPostback()inside the listener method.In the upcoming JSF 2.2
<f:viewAction>tag, which is supposed to replace this<f:event type="preRenderView">"workaround", it will however be possible with theonPostbackattribute:Snapshot releases of JSF 2.2 are already available.
See also: