I'm currently experiencing a problem with JSF's order of execution.
Looking at my sample code:
<p:commandButton action="update.xhtml" ajax="false"
icon="ui-icon-pencil"
actionListener="#{marketingCodeBean.initForUpdate}">
<f:setPropertyActionListener
target="#{marketingCodeBean.marketingCode}" value="#{code}"></f:setPropertyActionListener>
</p:commandButton>
I would like to set a bean property using setPropertyActionListener, and do some processing on actionListener=initForUpdate. But JSF default sequence of execution is the opposite, actionListener first before setPropertyActionListener. Is there a clean work around for this problem?
I'm thinking of having an actionListener and pass the bean parameter to it, but I'm not sure if that is the best approach.