你好,游客 登录 注册 搜索
背景:
阅读新闻

ADF中如何将两个独立的LOV实现级联

[日期:2012-02-23] 来源:Linux社区  作者:ygj26 [字体:大 中 小]

3.配置Backing Bean,给CascadeLOVBean中的属性赋值

[html]
  1. <?xml version="1.0" encoding="UTF-8" ?>  
  2. <adfc-config xmlns="http://xmlns.Oracle.com/adf/controller" version="1.2">  
  3.   <managed-bean id="__2">  
  4.     <managed-bean-name id="__3">CascadeLOVBean</managed-bean-name>  
  5.     <managed-bean-class id="__1">view.CascadeLOVBean</managed-bean-class>  
  6.     <managed-bean-scope id="__4">request</managed-bean-scope>  
  7.     <managed-property id="__7">  
  8.       <property-name id="__5">listBinding</property-name>  
  9.       <value id="__6">#{bindings.LocationList}</value>  
  10.     </managed-property>  
  11.     <managed-property id="__9">  
  12.       <property-name id="__10">iteratorBinding</property-name>  
  13.       <value id="__8">#{bindings.DepartmentsView1Iterator}</value>  
  14.     </managed-property>  
  15.     <managed-property id="__12">  
  16.       <property-name id="__11">attributeName</property-name>  
  17.       <value id="__13">LocationId</value>  
  18.     </managed-property>  
  19.     <managed-property id="__16">  
  20.       <property-name id="__14">parameterName</property-name>  
  21.       <value id="__15">locationId</value>  
  22.     </managed-property>  
  23.   </managed-bean>  
  24. </adfc-config>  

4. 页面,给location list绑定CascadeLOVBean的valueChangeListener方法,将Department List的partialTriggers指向Location List

[html]
  1. <af:panelFormLayout id="pfl1">  
  2.               <af:selectOneChoice label="Location"  
  3.                                   value="#{bindings.LocationList.inputValue}"  
  4.                                   id="soc1"  
  5.                                   valueChangeListener="#{CascadeLOVBean.valueChangeListener}"  
  6.                                   autoSubmit="true">  
  7.                 <f:selectItems value="#{bindings.LocationList.items}" id="si1"/>  
  8.               </af:selectOneChoice>  
  9.               <af:selectOneChoice label="Department"  
  10.                                   value="#{bindings.DepartmentList.inputValue}"  
  11.                                   id="soc2" partialTriggers="soc1">  
  12.                 <f:selectItems value="#{bindings.DepartmentList.items}"  
  13.                                id="si2"/>  
  14.               </af:selectOneChoice>  
  15.               <af:commandButton actionListener="#{bindings.ExecuteWithParams.execute}"  
  16.                                 text="Search"  
  17.                                 disabled="#{!bindings.ExecuteWithParams.enabled}"  
  18.                                 id="cb1"/>  
  19.             </af:panelFormLayout>  
linux
相关资讯       oracle数据库教程 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款