Ajax 如何重新渲染<;t:选择多个复选框布局=”t;散布>;?
我尝试重新渲染Ajax 如何重新渲染<;t:选择多个复选框布局=”t;散布>;?,ajax,jsf,jsf-2,tomahawk,Ajax,Jsf,Jsf 2,Tomahawk,我尝试重新渲染。但是,它不会重新渲染 Ajax调用: <h:selectBooleanCheckbox value="#{handler.property}"> <f:ajax listener="#{handler.toggleItems}" render="items" /> </h:selectBooleanCheckbox> 将调用侦听器并为设置新值,但不会重新呈现 你知道为什么吗?我也尝试了render=“myFor
。但是,它不会重新渲染
Ajax调用:
<h:selectBooleanCheckbox value="#{handler.property}">
<f:ajax listener="#{handler.toggleItems}" render="items" />
</h:selectBooleanCheckbox>
将调用侦听器并为
设置新值,但不会重新呈现
你知道为什么吗?我也尝试了
render=“myForm:items”
和render=“:myForm:items”
。它的形式相同。您还需要重新呈现展开的
项。我建议重新呈现和所有项的公共父项。如果不存在,请将其放入
中
例如
...
...
...
与
有效!(和往常一样!)谢谢!
<t:selectManyCheckbox id="items" layout="spread" forceId="true"
forceIdIndex="false" value="#{handler.selectedItems}"
required="true">
....
</t:selectManyCheckbox>
<h:panelGroup id="allCheckboxes">
<t:selectManyCheckbox id="items" layout="spread" ... />
...
<t:checkbox for="items" index="0" />
...
<t:checkbox for="items" index="1" />
...
</h:panelGroup>
<f:ajax render="allCheckboxes" />