由jsf级联下拉列表

时间:2013-05-22 12:10:48

标签: ajax events jsf-2

是否可以通过类别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>

0 个答案:

没有答案