如何使用ajax从selectOneRadio重新渲染selectManyCheckbox

时间:2012-06-05 09:00:45

标签: jsf trinidad

我正在尝试使用selectOneRadio来重绘我的一些组件(即启用/禁用它们)。我曾尝试使用我的selectManyCheckbox的ID;没用。我也尝试将selectManyCheckbox放在h:panelGroup内;也没用。我很确定我的标签是否正确创建,因为我不知道它是如何工作的。

这是我到目前为止所做的:

    <tr:selectOneRadio id="useFilterChoices" value="#{randomCardBean.useFilters}">
        <f:selectItem itemLabel="All Cards" itemValue="allCards"/>
        <f:selectItem itemLabel="Filter By Category" itemValue="someCards"/>
        <f:ajax event="click" render="categoryChoicesBox"/>
    </tr:selectOneRadio>

    <tr:selectManyCheckbox id="categoryChoicesBox" disabled="#{randomCardBean.filterDisabled}" value="#{randomCardBean.selectedFilters}">
        <f:selectItems value="#{randomCardBean.filterChoices}"/>
    </tr:selectManyCheckbox>

我正在使用selectOneRadio,因为我希望最终能够扩展过滤器选项。对此有任何帮助将非常感谢!

0 个答案:

没有答案