0
在按鈕下面示出與update="testTable"
Bean.getSensors
火災呼叫倍的代碼,但與update="@form"
火災只有一個按鈕。爲什麼?Primefaces的DataTable火災更新三次
<h:form id="form4" prependId="true">
<p:commandButton value="id" update="testTable" process="@none"/>
<p:commandButton value="@form" update="@form" process="@none"/>
<p:dataTable id="testTable" value="#{bean.sensors}"
var="sensor"
rowStyleClass="#{sensor.alarm ? 'alarm' : null}">
<p:column headerText="Name" style="min-width: 100px; width: 100px;">
<h:outputText value="#{sensor.name}"/>
</p:column>
<p:column headerText="Value" style="min-width: 100px; width: 100px;">
<h:outputText value="#{sensor.value}"/>
</p:column>
</p:dataTable>
</h:form>
謝謝大家!