Ejemplo n.º 1
0
  /**
   * Opens the help screen for the current module.
   *
   * @param event
   * @throws InterruptedException
   */
  private void doHelp(Event event) throws InterruptedException {

    ZksampleMessageUtils.doShowNotImplementedMessage();

    // we stop the propagation of the event, because zk will call ALL events
    // with the same name in the namespace and 'btnHelp' is a standard
    // button in this application and can often appears.
    // Events.getRealOrigin((ForwardEvent) event).stopPropagation();
    event.stopPropagation();
  }
Ejemplo n.º 2
0
  /**
   * Saves the components to table. <br>
   *
   * @throws InterruptedException
   */
  public void doSave() throws InterruptedException {

    final SecRole aRole = getRole();

    // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // force validation, if on, than execute by component.getValue()
    // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    if (!isValidationOn()) {
      doSetValidation();
    }

    // fill the object with the components data
    doWriteComponentsToBean(aRole);

    // save it to database
    try {
      getSecurityService().saveOrUpdate(aRole);
    } catch (DataAccessException e) {
      ZksampleMessageUtils.showErrorMessage(e.getMostSpecificCause().toString());

      // Reset to init values
      doResetInitValues();

      doReadOnly();
      btnCtrl.setBtnStatus_Save();
      return;
    }

    // now synchronize the listBox
    ListModelList lml = (ListModelList) listBoxSecRoles.getListModel();

    // Check if the object is new or updated
    // -1 means that the obj is not in the list, so it's new.
    if (lml.indexOf(aRole) == -1) {
      lml.add(aRole);
    } else {
      lml.set(lml.indexOf(aRole), aRole);
    }

    doReadOnly();
    btnCtrl.setBtnStatus_Save();

    // init the old values vars new
    doStoreInitValues();
  }
Ejemplo n.º 3
0
 /**
  * when the "print calendar" button is clicked.
  *
  * @param event
  * @throws InterruptedException
  */
 public void onClick$btn_Calendar_PrintCalendar(Event event) throws InterruptedException {
   ZksampleMessageUtils.doShowNotImplementedMessage();
 }
Ejemplo n.º 4
0
  /**
   * when the "help" button is clicked. <br>
   *
   * @param event
   * @throws InterruptedException
   */
  public void onClick$btnHelp(Event event) throws InterruptedException {
    // logger.debug(event.toString());

    ZksampleMessageUtils.doShowNotImplementedMessage();
  }
Ejemplo n.º 5
0
  /**
   * Saves the components to table. <br>
   *
   * @throws InterruptedException
   */
  public void doSave() throws InterruptedException {

    Orderposition anOrderposition = getOrderposition();

    // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // force validation, if on, than execute by component.getValue()
    // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    if (!isValidationOn()) {
      doSetValidation();
    }

    artNr.getValue();

    // additionally calculate new
    if (isDataChanged()) {
      doCalculate();
    }

    // fill the objects with the components data
    doWriteComponentsToBean(anOrderposition);

    // save it to database
    try {
      getOrderService().saveOrUpdate(anOrderposition);
    } catch (DataAccessException e) {
      ZksampleMessageUtils.showErrorMessage(e.getMostSpecificCause().toString());

      // Reset to init values
      doResetInitValues();

      doReadOnly();
      btnCtrl.setBtnStatus_Save();
      return;
    }

    /** Synchronize the listbox in the OrderDialog */
    HibernateSearchObject<Orderposition> soOrderPosition =
        new HibernateSearchObject<Orderposition>(
            Orderposition.class, orderDialogCtrl.getPageSizeOrderPosition());
    soOrderPosition.addFilter(new Filter("order", getOrder(), Filter.OP_EQUAL));
    // deeper loading of a relation to prevent the lazy
    // loading problem.
    soOrderPosition.addFetch("article");

    // Set the ListModel.
    getPlwOrderpositions()
        .init(
            soOrderPosition,
            orderDialogCtrl.listBoxOrderOrderPositions,
            orderDialogCtrl.paging_ListBoxOrderOrderPositions);

    /** Synchronize the OrderList */
    // Listbox listBoxOrderArticle = orderListCtrl.getListBoxOrderArticle();
    // listBoxOrderArticle.setModel(orderDialogCtrl.listBoxOrderOrderPositions.getModel());
    orderListCtrl
        .getListBoxOrderArticle()
        .setModel(orderDialogCtrl.listBoxOrderOrderPositions.getModel());

    // synchronize the TotalCount from the paging component
    orderListCtrl.paging_OrderArticleList.setTotalSize(
        orderDialogCtrl.paging_ListBoxOrderOrderPositions.getTotalSize());

    doReadOnly();
    btnCtrl.setBtnStatus_Save();
    // init the old values vars new
    doStoreInitValues();
  }
Ejemplo n.º 6
0
 /**
  * When the "help" button is clicked. <br>
  *
  * @param event
  * @throws InterruptedException
  */
 public void onClick$btnHelp(Event event) throws InterruptedException {
   ZksampleMessageUtils.doShowNotImplementedMessage();
 }
Ejemplo n.º 7
0
 /**
  * when the "print" button is clicked.
  *
  * @param event
  * @throws InterruptedException
  */
 public void onClick$button_SecLoginlogList_PrintLoginList(Event event)
     throws InterruptedException {
   ZksampleMessageUtils.doShowNotImplementedMessage();
 }