Java 1.7 / JSF 2 / JPA 2 / PrimeFaces 6.1
I'm refactoring my application to use @ConversationScoped
. I have a backing bean that allows the user to select a number of entities after providing some search arguments. For each row in the resulting listing I have a Edit button that navigates to another view.
Everything was working until a annotated the backing bean with @ConversationScoped
. After that, everytime the user clicks any of edit buttons, the search page simply reloads and no navigation happens.
The edit method bound to the edit button is not called anymore.
Any ideas?
I was not adding the cdi button parameter. In order to fix the problem my button had to be something like this:
<p:commandButton title="Edit"
action="#{myMB.nextView}"
ajax="false">
<f:param name="id" value="#{bean.id}"/>
<f:param name="cid" value="#{myMB.conversation.id}"/>
</p:commandButton>
Notice the cid parameter, it wasn't there when I had the problem I described.