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