コード例 #1
0
 /**
  * This is a support method to create the table cells of one row from one or more BusinessDatas.
  * You may overwrite this method if you need a custom mapping from BusinessData attributes to
  * table columns that you were unable to specify in the UI designer.
  *
  * @return the returned Object[] is needed in the constructor of a <tt>TableRow</tt>.
  */
 public Object[] customerTableCreateCells(org.openxma.dsl.reference.dto.CustomerView customers) {
   Object[] cells = new Object[4];
   cells[0] = customers.getFirstName();
   cells[1] = customers.getLastName();
   cells[2] = customers.getBirthDate();
   cells[3] = customers.getEmailAddress();
   return cells;
 }
コード例 #2
0
 /**
  * This method creates a TableRow object and adds it to the end of the table. The key of the row
  * is drawn from the key attribute specified in the UI designer. The image id is resolved by
  * calling customerTableGetImageId. The cells of the table are taken from a call to
  * customerTableCreateCells.
  */
 public TableRow customerTableAddRow(org.openxma.dsl.reference.dto.CustomerView customers) {
   return new TableRow(
       (TableWM) customerTable,
       customers.getOid().toString(),
       customerTableCreateCells(customers),
       customerTableGetImageFor(customers));
 }
コード例 #3
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());
 }
コード例 #4
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());
 }