public static List<SelectItem> getFilterSelectItems( String viewObject, String valueName, String captionName, boolean isEmptyRowExists, Object valueEmpty, String captionEmpty, String dataControlName) { // ApplicationModule mod = ADFUtils.getApplicationModuleForDataControl(dataControlName); AppModuleImpl mod = (AppModuleImpl) ADFUtils.getBindingApplicationModule(); ViewObject vo = mod.findViewObject(viewObject); List<SelectItem> rc = new ArrayList<SelectItem>(); vo.reset(); if (isEmptyRowExists) { rc.add(new SelectItem(valueEmpty, captionEmpty)); } while (vo.hasNext()) { Row rowItem = vo.next(); Object valueItem = rowItem.getAttribute(valueName); String captionItem = (String) rowItem.getAttribute(captionName); rc.add(new SelectItem(valueItem, captionItem)); } return rc; }
@PostConstruct public void initBean() { RGunGunsViewImpl vo = (RGunGunsViewImpl) mod.getRGunGunsView1(); Row row = vo.getCurrentRow(); ADFUtils.printDataRow(row); }