将对象从<p:datatable>传递给<p:dialog> JSF / PrimeFaces

时间:2015-07-31 06:45:03

标签: jsf primefaces datatable dialog

我试图将对象entry从DataTable(单击按钮的行)传递到对话框中。我希望通过editEntry(entry)方法调用来编辑数据并提交更改。

<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>

我找到了这个this solution,但我想在对话框中进行一些更改后提交。我还发现了this one <f:setPropertyActionListener>,但我不确定如何实现它。

我很感激任何帮助。

提前致谢!

0 个答案:

没有答案