jsf - OverlayPanel inside a Datatable -


i need have overlay panel in each row of datatable changing record on fly. can see below:

enter image description here

i don't know why when press save button calls 2 times setter of attribute(str) store new age. first time sets new value, in second set returns 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's 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 regards,

luis

@edit:

guess it's solved... added dynamic="true" , seems work fine. tomorrow i'll validate solution, , confirm here.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -