3.配置Backing Bean,给CascadeLOVBean中的属性赋值
- <?xml version="1.0" encoding="UTF-8" ?>
- <adfc-config xmlns="http://xmlns.Oracle.com/adf/controller" version="1.2">
- <managed-bean id="__2">
- <managed-bean-name id="__3">CascadeLOVBean</managed-bean-name>
- <managed-bean-class id="__1">view.CascadeLOVBean</managed-bean-class>
- <managed-bean-scope id="__4">request</managed-bean-scope>
- <managed-property id="__7">
- <property-name id="__5">listBinding</property-name>
- <value id="__6">#{bindings.LocationList}</value>
- </managed-property>
- <managed-property id="__9">
- <property-name id="__10">iteratorBinding</property-name>
- <value id="__8">#{bindings.DepartmentsView1Iterator}</value>
- </managed-property>
- <managed-property id="__12">
- <property-name id="__11">attributeName</property-name>
- <value id="__13">LocationId</value>
- </managed-property>
- <managed-property id="__16">
- <property-name id="__14">parameterName</property-name>
- <value id="__15">locationId</value>
- </managed-property>
- </managed-bean>
- </adfc-config>
4. 页面,给location list绑定CascadeLOVBean的valueChangeListener方法,将Department List的partialTriggers指向Location List
- <af:panelFormLayout id="pfl1">
- <af:selectOneChoice label="Location"
- value="#{bindings.LocationList.inputValue}"
- id="soc1"
- valueChangeListener="#{CascadeLOVBean.valueChangeListener}"
- autoSubmit="true">
- <f:selectItems value="#{bindings.LocationList.items}" id="si1"/>
- </af:selectOneChoice>
- <af:selectOneChoice label="Department"
- value="#{bindings.DepartmentList.inputValue}"
- id="soc2" partialTriggers="soc1">
- <f:selectItems value="#{bindings.DepartmentList.items}"
- id="si2"/>
- </af:selectOneChoice>
- <af:commandButton actionListener="#{bindings.ExecuteWithParams.execute}"
- text="Search"
- disabled="#{!bindings.ExecuteWithParams.enabled}"
- id="cb1"/>
- </af:panelFormLayout>
