0
我想從html更新後端布爾值。 我發現h:selectBooleanCheckbox
可以。 我已經把它放在我的XHTML是這樣的:JSF布爾屬性沒有得到更新selectBooleanCheckbox
<h:dataTable var="row" value="#{generalBean.organisations}">
<h:column>
<h:selectBooleanCheckbox value="#{row.enabled}">
<p:ajax update="lineChart" />
</h:selectBooleanCheckbox>
</h:column>
<h:column>
<h:outputText value="#{row.name}"/>
</h:column>
</h:dataTable>
它檢索enabled屬性很好,但是當我取消選中該複選框它不會在組織模型得到更新。
我做錯了什麼?我確實擁有啓用屬性的getter和setter。
PS:ajax更新適用於複選框未勾選時需要更新的圖表。