1

ブール値のプロパティを持つオブジェクトのリストがあります。チェックボックスのリストを使用して、リスト内のすべてのオブジェクトのプロパティを選択/選択解除しています。私の問題は、フォームを再レンダリングした後、既に選択されているチェックボックスが空に見えることです。何故ですか?

<h:form>
    <ui:repeat value="#{bean.employeeList}" var="employee">
        <h:selectBooleanCheckbox value="#{employee.selected}">
        <h:outputText value="#{employee.name}" />
        </h:selectBooleanCheckbox>
    </ui:repeat>

    <h:selectBooleanCheckbox value="#{bean.isDone}">
        <f:ajax event="click" render="@form" />
    </h:selectBooleanCheckbox>
</h:form>
4

1 に答える 1

1

The <f:ajax> processes by default the current component, as in execute="@this". You need to explicitly specify the entire form by @form if you intend to process the entire form.

<f:ajax execute="@form" render="@form" />

Note that I removed event="click". This is namely the default already.

于 2013-09-23T00:05:18.437 に答える