4) JSF页面中多个comboselect进行级联.DOCVIP

  • 19
  • 0
  • 约4.9千字
  • 约 5页
  • 2017-07-03 发布于天津
  • 举报
4) JSF页面中多个comboselect进行级联

JSF中实现级联查询 SUP2展现开发中页面部分采用了JSF技术,对级联查询支持不够友好,实现比较复杂,通过对JSF进行扩展,加入xmdc:comboSelect标签,并且支持调用UCC暴露出来的服务,可以方便得实现级联查询的功能.下面为一个三级级联查询的实现步骤: 定义两个类 Country.java和CountryData.java用来配置相关数据. 相关代码: Country.java package com.ccb.test.data; public class Country { private String countryID; private String couName; private String praID; public String getCouName() { return couName; } public void setCouName(String couName) { this.couName = couName; } public String getCountryID() { return countryID; } public void setCountryID(String countryID) { this.countryID = countryID; } public String getPraID() { return praID; } public void setPraID(String praID) { this.praID = praID; } public Country(String countryID, String couName, String praID) { super(); this.countryID = countryID; this.couName = couName; this.praID = praID; } public Country() { super(); } } CountryData.java package com.ccb.test.data; import java.util.ArrayList; import java.util.List; public class CountryData { public static ListCountry countryList = new ArrayListCountry(); static{ countryList.add(new Country(1,中国,0)); countryList.add(new Country(2,英国,0)); countryList.add(new Country(3,美国,0)); countryList.add(new Country(4,上海,1)); countryList.add(new Country(5,厦门,1)); countryList.add(new Country(6,香港,1)); countryList.add(new Country(7,伦敦,2)); countryList.add(new Country(8,纽约,3)); countryList.add(new Country(9,张江,4)); countryList.add(new Country(10,静安寺,4)); countryList.add(new Country(11,五角场,4)); countryList.add(new Country(12,厦大,5)); countryList.add(new Country(13,建行大厦,5)); countryList.add(new Country(14,鹭江道,5)); countryList.add(new Country(15,鼓浪屿,5)); countryList.add(new Country(16,环岛路,5)); } } 创建实现数据查询的UCC接口及实现 接口: ICountryUCC.java package cn.ccb.functionwizard.supapp.ucc; import java.util.List; import org.osoa.sca.annotations.Remotable; import mon.IUCC; import com.ccb.test.data.Country; @Remotable

文档评论(0)

1亿VIP精品文档

相关文档