我在 JSF 2.0 中有一个包含大量文本(标签)和复选框的表单。提交时文本永远不会更新,但复选框值会更新。
例如:
<h:form>
<h:outputLabel value="bla bla bla bla .. X 1000" id="lab1">
<h:selectBooleanCheckbox for="lab1">
<h:outputLabel value="bla bla bla bla .. X 1000" id="lab2">
<h:selectBooleanCheckbox for="lab2">
.... many more labels and checkboxes ...
<h:commandButton>
<f:ajax render="@form" execute="@form" />
</h:commandButton>
</h:form>
问题是每当我提交时,整个表单内容都会被重新渲染。我只想重新渲染复选框值。这可以节省 90% 的请求大小。
这个问题有好的解决方案吗?