Problem when click on a button inside each row of a table and update the selected row - happens from the second page

UI Components for JSF
Post Reply
Carol Carmo
Posts: 3
Joined: 18 Mar 2021, 18:49

30 Nov 2021, 14:13


I have a lazy table where in each row there is a button to see details about the row in question.
The problem is that if I select, for example row 1, but press the details button for row 2, the details shown are for row 1. This problem only happens from the second page onwards.
In my button I have an actionListener that will update the selected row to the row where the button is, but this action is never triggered when a row has already been selected ( This problem only happens from the second page onwards.)
I don't understand why.
Can you help me?

Code of details button column:

<p:column width="30" id="info" resizable="false"
exportable="false" headerText="Info.">
<p:commandButton id="selectButton"
update=":form:display-details, :form:docDetailsDialog"
oncomplete="PF('detailsDialog').show()" icon="fa fa-info"
title="Details" actionListener="#{docBean.getSavedDocument}" process="@this" >
<f:setPropertyActionListener value="#{docBean.getSavedDocument}"
target="#{docBean.documentSelected}" />

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 17 guests