I'm using a <f:event type="preRenderView" listener="#{bean.listener()}"/>
event. It's triggered both on page reload (F5), and when a press a button on the page (that renders a table).
<a4j:commandButton
value="rerender"
action="#{bean.updateTable()}"
render="myTable" />
I need to call the listener only on page refresh (F5), not when the button is pressed.
Is there a way?
FacesContext.getCurrentInstance().isPostback()
will not solve, because the button is also a POST.