0

是否可以通过传递类别 obj 来按类别 selectMenu onchange 更新子类别?

    <p:selectOneMenu id="expenseTypeValue"
                            value="#{expenseBean.expense.expenseType}"
                            disabled="#{expenseBean.dataVisible}">
                            <f:selectItem itemLabel="Select One" itemValue="" />
                            <f:selectItems value="#{expenseBean.parentCategoryItems}"
                                var="parentCategory1"
                                itemLabel="#{parentCategory1.expenseCategoryDesc}"
                                itemValue="#{parentCategory1.expenseCategoryId}" />
                            <f:attribute name="parentCategory"
                                value="#{expenseBean.parentCategory1}"></f:attribute>
                            <p:ajax update="subCategory"
                                listener="#{expenseBean.getSubCategory(parentCategory1)}" />
                        </p:selectOneMenu>

4

0 回答 0