Package de.forsthaus.backend.model

Examples of de.forsthaus.backend.model.Office


   * Event is forwarded in the corresponding listbox.
   */
  public void onDoubleClickedOfficeItem(Event event) {
    // logger.debug(event.toString());

    Office anOffice = getSelectedOffice();

    if (anOffice != null) {
      setSelectedOffice(anOffice);
      setOffice(anOffice);

View Full Code Here


   */
  public void onSelect$listBoxOffice(Event event) {
    // logger.debug(event.toString());

    // selectedOffice is filled by annotated databinding mechanism
    Office anOffice = getSelectedOffice();

    if (anOffice == null) {
      return;
    }

    // check first, if the tabs are created
    if (getOfficeMainCtrl().getOfficeDetailCtrl() == null) {
      Events.sendEvent(new Event("onSelect", getOfficeMainCtrl().tabOfficeDetail, null));
      // if we work with spring beanCreation than we must check a little
      // bit deeper, because the Controller are preCreated ?
    } else if (getOfficeMainCtrl().getOfficeDetailCtrl().getBinder() == null) {
      Events.sendEvent(new Event("onSelect", getOfficeMainCtrl().tabOfficeDetail, null));
    }

    // INIT ALL RELATED Queries/OBJECTS/LISTS NEW
    getOfficeMainCtrl().getOfficeDetailCtrl().setSelectedOffice(anOffice);
    getOfficeMainCtrl().getOfficeDetailCtrl().setOffice(anOffice);

    // store the selected bean values as current
    getOfficeMainCtrl().doStoreInitValues();

    // show the objects data in the statusBar
    String str = Labels.getLabel("common.Office") + ": " + anOffice.getFilBezeichnung();
    EventQueues.lookup("selectedObjectEventQueue", EventQueues.DESKTOP, true).publish(new Event("onChangeSelectedObject", null, str));

  }
View Full Code Here

@Repository
public class OfficeDAOImpl extends BasisDAO<Office> implements OfficeDAO {

  @Override
  public Office getNewOffice() {
    return new Office();
  }
View Full Code Here

    return getHibernateTemplate().loadAll(Office.class);
  }

  @Override
  public void deleteOfficeById(long id) {
    Office office = getOfficeById(id);
    if (office != null) {
      delete(office);
    }
  }
View Full Code Here

  @Override
  public void saveOrUpdate(Customer customer) {
    if (customer.isNew()) {

      // Todo get the Office ID from the login method
      Office office = getOfficeDAO().getOfficeById(Long.valueOf(1));

      customer.setOffice(office);
      getCustomerDAO().save(customer);
    } else {
      getCustomerDAO().update(customer);
View Full Code Here

  /**
   * For DEMO MODE we set the office number manually.<br>
   */
  private void doDemoMode() {

    Office office = getOfficeService().getOfficeByID(Long.valueOf(1));
    getUserWorkspace().setOffice(office);

  }
View Full Code Here

    // check first, if the tabs are created
    if (getOfficeDetailCtrl().getBinder() == null) {
      return;
    }

    final Office anOffice = getSelectedOffice();
    if (anOffice != null) {

      // Show a confirm box
      final String msg = Labels.getLabel("message.Question.Are_you_sure_to_delete_this_record") + "\n\n --> " + anOffice.getFilBezeichnung();
      final String title = Labels.getLabel("message.Deleting.Record");

      MultiLineMessageBox.doSetTemplate();
      if (MultiLineMessageBox.show(msg, title, Messagebox.YES | Messagebox.NO, Messagebox.QUESTION, true, new EventListener() {
        @Override
View Full Code Here

    }

    // remember the current object
    doStoreInitValues();

    /** !!! DO NOT BREAK THE TIERS !!! */
    // We don't create a new DomainObject() in the frontend.
    // We GET it from the backend.
    final Office anOffice = getOfficeService().getNewOffice();

    // set the beans in the related databinded controllers
View Full Code Here

  }

  public void onClick$button_insertCustomers(Event event) throws InterruptedException {

    final Branche branche = getBrancheService().getBrancheById(1000);
    final Office office = getOfficeService().getOfficeByID(Long.valueOf(1));

    final int countRecords = 10000;

    final RandomDataEngine randomDataEngine = new RandomDataEngine();
View Full Code Here

TOP

Related Classes of de.forsthaus.backend.model.Office

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.