Package org.araneaframework.example.main.business.model

Examples of org.araneaframework.example.main.business.model.PersonMO


      return ((PersonMO) row).getId();
    }
   
    public void saveValidRow(FormRow editableRow) throws Exception {
      //Reading data
      PersonMO rowData = (PersonMO) TemplateUiLibUtil.readDtoFromForm(new PersonMO(), editableRow.getRowForm());
      rowData.setId((Long) editableRow.getRowKey());
     
      //Saving data
      getGeneralDAO().edit(rowData);
     
      editableRow.close();
View Full Code Here


      Long id = (Long) key;
      getGeneralDAO().remove(PersonMO.class, id);
    }
   
    public void addValidRow(FormWidget addForm) throws Exception {
      PersonMO rowData = (PersonMO) TemplateUiLibUtil.readDtoFromForm(new PersonMO(), addForm);
      getGeneralDAO().add(rowData);
      formList.resetAddForm();
    }
View Full Code Here

    form.addBeanElement("surname", "#Last name", new TextControl(), false);
    form.addBeanElement("phone", "#Phone no", new TextControl(), true);
    form.addBeanElement("birthdate", "#Birthdate", new DateControl(), false);

    if (id != null) {
      PersonMO person = (PersonMO) getGeneralDAO().getById(PersonMO.class, id);
      form.writeBean(person);
    }

    addWidget("form", form);
  }
View Full Code Here

  }
 
  public void handleEventSave(String eventParameter) throws Exception {
    log.debug("Event 'save' received!");
    if (form.convertAndValidate()) {
      PersonMO person = id != null ? (PersonMO) getGeneralDAO().getById(PersonMO.class, id) : new PersonMO();
      person = (PersonMO) form.readBean(person);
     
      if (id != null) {
        getGeneralDAO().edit(person);
      } else {
View Full Code Here

TOP

Related Classes of org.araneaframework.example.main.business.model.PersonMO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.