可以通过lov生成,这种是最快的。下面是手动生成的:
publicList<SelectItem> getAccessValue(String vomc,String lb,String value){
List<SelectItem> hcList = newArrayList<SelectItem>();
ViewObject hcVO = am.findViewObject(vomc);
RowSetIterator hcRSI =hcVO.createRowSetIterator("hcRSI");
hcRSI.setRangeSize(-1);
for (Row hc :hcRSI.getAllRowsInRange()) {
SelectItem selectItem = newSelectItem();
selectItem.setLabel((String)hc.getAttribute(lb));
selectItem.setValue(hc.getAttribute(value));
hcList.add(selectItem);
}
hcRSI.closeRowSetIterator();
return hcList;
}
/*
* 获得案件状态下拉列表
*/
List<SelectItem> ls = newArrayList<SelectItem>();
publicList<SelectItem> getListValue() {
ls =getAccessValue("BsVVO1","mc","dm");
return ls;
}