如何使用Primefaces CommandButton更新表(不是数据表)

Lum*_*i47 4 html jsf primefaces

<h:form id="tableForm">
   <table id="myTable">
     <tr>
       <th>HeaderOne</th>  
       <th>HeaderTwo</th>
       <th>HeaderThree</th>
     </tr>
     <ui:repeat value="#{myBean.List}" var="row">
       <tr class="myRows">
         <td><input type="text" value="#{row.fieldOne} required="required" /></td>
         <td><input type="text" value="#{row.fieldTwo}  /></td>
         <td><input type="text" value="#{row.fieldThree} /></td>
       </tr>
     </ui:repeat>
   </table>
   <p:commandButton id="myButton" value="Load" action="#{myBean.load}" process="@this" update="myTable" />
</h:form>
Run Code Online (Sandbox Code Playgroud)

我想从我的bean中将一些东西加载到我的inputFields中,但是当我按下save时需要一个字段.所以我必须将进程设置为@this.

之后我希望我的表格更新.但我不行.

我究竟做错了什么?

Sch*_*äbo 5

尝试更新表单

<p:commandButton ... action="#{myBean.load}" process="@this" update="tableForm" />
Run Code Online (Sandbox Code Playgroud)

因为表不是jsf元素而是"纯"html,所以你不能在jsf元素中使用它的id