Exemplo n.º 1
0
  /** 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
        };
  }
Exemplo n.º 2
0
 /** 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());
 }
Exemplo n.º 3
0
 /** 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());
 }