/** Create and initialize the WidgetModels of the page. */ public void createModels() { IFmt formatter; CompoundValidator compound; customer_firstName = new SimpleWM((short) 0, Types.T_STRING, this); formatter = AStringFmt.getInstance(25); compound = new CompoundValidator(formatter); formatter = AStringFmt.getInstance(25); compound.setFormatter(formatter); formatter = compound; customer_firstName.setFmt(formatter); customer_firstName.setMandatory(true); customer_lastName = new SimpleWM((short) 1, Types.T_STRING, this); formatter = AStringFmt.getInstance(50); compound = new CompoundValidator(formatter); formatter = AStringFmt.getInstance(50); compound.setFormatter(formatter); formatter = compound; customer_lastName.setFmt(formatter); customer_lastName.setMandatory(true); customerTable = new TableWM((short) 2, this, 4, TableWM.S_NULL | TableWM.S_ONE_WAY); widgetModels = new WModel[] { (WModel) customer_firstName, (WModel) customer_lastName, (WModel) customerTable }; }
/** Copies attribute values of the provided BusinessDatas into widget models. */ public void businessDataToAtomicWM(org.openxma.dsl.reference.dto.CustomerView customer) { customer_firstName.set(customer.getFirstName()); customer_lastName.set(customer.getLastName()); }
/** Copies values of widget models to attributes of the provided BusinessData objects. */ public void atomicWMToBusinessData(org.openxma.dsl.reference.dto.CustomerView customer) { customer.setFirstName(customer_firstName.toString()); customer.setLastName(customer_lastName.toString()); }