2

I'm trying to pass object entry from DataTable (the row where the button was clicked) into a dialog box. There i want to edit data and submit changes with a call on editEntry(entry) method.

<h:form>
    <p:dataTable id="dataTableID" value="#{backingBean.uploadedFileData}" var="entry">
         <p:column headerText="Edit">
             <onclick="PF('editEntryDialog').show();"
         </p:column>
    </p:dataTable>

    <p:dialog header="Edit Entry" widgetVar="editEntryDialog" height="220" width="450">

         //Dropdowns which are used to edit the entry on the chosen row

        <h:commandButton id="editNewEntryButtonEdit" value="Edit"
            action="#{backingBeann.editEntry(entry)}"/>
   </p:dialog>
</h:form>

I found this this solution but I want to submit after I make some changes in the dialog box. Also I found this one with <f:setPropertyActionListener> but I'm not really sure how to implement it.

I'd appreciate any help.

Thanks in advance!

Community
  • 1
  • 1
i23
  • 508
  • 2
  • 12

0 Answers0