I need to have an overlap panel in each row of my datatable to change records on the fly. As you can see below:

I do not know why, when I press the save button, it twice calls the Setter of my attribute (str), where I store the new Age. The first time it sets a new value, but in the second set it just returns a null value.
22: 32: 34,502 INFO [stdout] (http-localhost-127.0.0.1-8080-3) 31
22: 32: 34,502 INFO [stdout] (http-localhost-127.0.0.1-8080-3)
Here is the code:
<p:dataTable value="#{backbean.l}" var="l" style="width: 300px;"> <p:column> <h:outputText value="#{l.id}" /> </p:column> <p:column> <h:outputText value="#{l.nome}" /> </p:column> <p:column> <h:outputText value="#{l.age}" /> </p:column> <p:column> <p:graphicImage value="/img/icone.png" id="newAge"> <p:overlayPanel id="imgPanel" for="newAge" showEvent="mouseover" hideEvent="mousedown" showCloseIcon="true"> <h:outputText value="Change Age:" /> <p:inputText value="#{backbean.str}" style="margin-left: 10px;"></p:inputText> <br /> <p:commandButton action="#{backbean.save}" value="Save"></p:commandButton> </p:overlayPanel> </p:graphicImage> </p:column> </p:dataTable>
Thanks in advance.
Best wishes,
Louis
@Edit:
Guess what he decided ... Just added dynamic = "true" and it seems to be working fine. Tomorrow I will check this solution and then confirm it here.
source share