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); }
public class Person_weapon_edit { private AppModuleImpl mod = (AppModuleImpl) ADFUtils.getBindingApplicationModule(); private RichForm f1; private RichDocument d1; private RichPanelBox pb1; private RichToolbox t1; private RichPanelFormLayout pfl1; private RichCommandButton cb1; @PostConstruct public void initBean() { RGunGunsViewImpl vo = (RGunGunsViewImpl) mod.getRGunGunsView1(); Row row = vo.getCurrentRow(); ADFUtils.printDataRow(row); } public void setF1(RichForm f1) { this.f1 = f1; } public RichForm getF1() { return f1; } public void setD1(RichDocument d1) { this.d1 = d1; } public RichDocument getD1() { return d1; } public void setPb1(RichPanelBox pb1) { this.pb1 = pb1; } public RichPanelBox getPb1() { return pb1; } public void setT1(RichToolbox t1) { this.t1 = t1; } public RichToolbox getT1() { return t1; } public void setPfl1(RichPanelFormLayout pfl1) { this.pfl1 = pfl1; } public RichPanelFormLayout getPfl1() { return pfl1; } public void setCb1(RichCommandButton cb1) { this.cb1 = cb1; } public RichCommandButton getCb1() { return cb1; } }