Package org.zkoss.zk.ui.event

Examples of org.zkoss.zk.ui.event.Event


      // later refresh StatusBar
      Events.postEvent("onSelect", getBranchListCtrl().getListBoxBranch(), getSelectedBranche());

      // show the objects data in the statusBar
      final String str = getSelectedBranche().getBraBezeichnung();
      EventQueues.lookup("selectedObjectEventQueue", EventQueues.DESKTOP, true).publish(new Event("onChangeSelectedObject", null, str));

    } catch (final DataAccessException e) {
      ZksampleMessageUtils.showErrorMessage(e.getMostSpecificCause().toString());

      // Reset to init values
View Full Code Here


  private void doNew(Event event) throws InterruptedException {
    // logger.debug(event.toString());

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

    // remember the current object
    doStoreInitValues();
View Full Code Here

     * current/selected tab.
     */
    Tab currentTab = tabbox_BranchMain.getSelectedTab();

    if (getBranchDetailCtrl().getBinder() == null) {
      Events.sendEvent(new Event(Events.ON_SELECT, tabBranchDetail, null));
    }

    // go back to selected tab
    currentTab.setSelected(true);

    // Check which button is clicked and calculate the rowIndex
    if (((ForwardEvent) event).getOrigin().getTarget() == btnNext) {
      if (index < (blml.size() - 1)) {
        index = index + 1;
      }
    } else if (((ForwardEvent) event).getOrigin().getTarget() == btnPrevious) {
      if (index > 0) {
        index = index - 1;
      }
    } else if (((ForwardEvent) event).getOrigin().getTarget() == btnFirst) {
      if (index != 0) {
        index = 0;
      }
    } else if (((ForwardEvent) event).getOrigin().getTarget() == btnLast) {
      if (index != blml.size()) {
        index = (blml.size() - 1);
      }
    }

    getBranchListCtrl().getListBoxBranch().setSelectedIndex(index);
    setSelectedBranche((Branche) blml.get(index));

    // call onSelect() for showing the objects data in the statusBar
    Events.sendEvent(new Event(Events.ON_SELECT, getBranchListCtrl().getListBoxBranch(), getSelectedBranche()));

    // refresh master-detail MASTERS data
    getBranchDetailCtrl().getBinder().loadAll();
  }
View Full Code Here

    final String version = zkVersion + " | " + _version;
    final String tenantId = "4711";
    final String officeID = "39";
    final String tableSchemaName = "public";

    EventQueues.lookup("userNameEventQueue", EventQueues.DESKTOP, true).publish(new Event("onChangeUser", null, userName));

    EventQueues.lookup("tenantIdEventQueue", EventQueues.DESKTOP, true).publish(new Event("onChangeTenant", null, tenantId));

    EventQueues.lookup("officeIdEventQueue", EventQueues.DESKTOP, true).publish(new Event("onChangeOfficeId", null, officeID));

    EventQueues.lookup("appVersionEventQueue", EventQueues.DESKTOP, true).publish(new Event("onChangeAppVersion", null, version));

    EventQueues.lookup("tableSchemaEventQueue", EventQueues.DESKTOP, true).publish(new Event("onChangeTableSchema", null, tableSchemaName));

    /**
     * Creates the ApplicationMessageQueue
     */
    new ApplicationMessageQueue();
View Full Code Here

          map.put("title", "Zksample2 Notification");
          map.put("message", "<br>Hello i'm a notification based on ZK-Gritter.<br><br>Many thanks to gekkio for writting the implementation.");
          map.put("autoClosing", false);
          EventQueue eq;
          eq = EventQueues.lookup("ApplicationEventQueue", EventQueues.APPLICATION, false);
          eq.publish(new Event("APPLICATION_NOTIFICATION", null, map));

          // notification with title + message + image
          map = new HashMap<String, Object>(0);
          map.put("title", "WOW !!!");
          map.put("message",
              "The notifications can hold a little image.<br><br> You can close me by clicking the 'x' in the left top corner shown when mouse is over.<br><br>Further you can stop/start the notifications with the checkbox <br>EN: 'stop notifications' <br>DE: 'Stoppe Benachrichtigungen'<br> on top right of the application.");
          map.put("autoClosing", true);
          map.put("image", "/images/sge.jpg");
          // EventQueues.lookup("ApplicationEventQueue",
          // EventQueues.APPLICATION, true).publish(new
          // Event("APPLICATION_NOTIFICATION", null, map));
          eq.publish(new Event("APPLICATION_NOTIFICATION", null, map));

        }
      });
      this.timer.setRunning(true);
    }
View Full Code Here

    // get the current Tab for later checking if we must change it
    Tab currentTab = tabbox_OfficeMain.getSelectedTab();

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

    // check if the tab is one of the Detail tabs. If so do not change the
    // selection of it
    if (!currentTab.equals(tabOfficeDetail)) {
View Full Code Here

  private void doDelete(Event event) throws InterruptedException {
    // logger.debug(event.toString());

    // check first, if the tabs are created, if not than create them
    if (getOfficeDetailCtrl().getBinder() == null) {
      Events.sendEvent(new Event("onSelect", tabOfficeDetail, null));
    }

    // check first, if the tabs are created
    if (getOfficeDetailCtrl().getBinder() == null) {
      return;
View Full Code Here

      // later refresh StatusBar
      Events.postEvent("onSelect", getOfficeListCtrl().getListBoxOffice(), getSelectedOffice());

      // show the objects data in the statusBar
      String str = getSelectedOffice().getFilBezeichnung();
      EventQueues.lookup("selectedObjectEventQueue", EventQueues.DESKTOP, true).publish(new Event("onChangeSelectedObject", null, str));

    } catch (DataAccessException e) {
      ZksampleMessageUtils.showErrorMessage(e.getMostSpecificCause().toString());

      // Reset to init values
View Full Code Here

  private void doNew(Event event) {
    // logger.debug(event.toString());

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

    // remember the current object
    doStoreInitValues();
View Full Code Here

     * current/selected tab.
     */
    Tab currentTab = tabbox_OfficeMain.getSelectedTab();

    if (getOfficeDetailCtrl().getBinder() == null) {
      Events.sendEvent(new Event(Events.ON_SELECT, tabOfficeDetail, null));
    }

    // go back to selected tab
    currentTab.setSelected(true);

    // Check which button is clicked and calculate the rowIndex
    if (((ForwardEvent) event).getOrigin().getTarget() == btnNext) {
      if (index < (blml.size() - 1)) {
        index = index + 1;
      }
    } else if (((ForwardEvent) event).getOrigin().getTarget() == btnPrevious) {
      if (index > 0) {
        index = index - 1;
      }
    } else if (((ForwardEvent) event).getOrigin().getTarget() == btnFirst) {
      if (index != 0) {
        index = 0;
      }
    } else if (((ForwardEvent) event).getOrigin().getTarget() == btnLast) {
      if (index != blml.size()) {
        index = (blml.size() - 1);
      }
    }

    getOfficeListCtrl().getListBoxOffice().setSelectedIndex(index);
    setSelectedOffice((Office) blml.get(index));

    // call onSelect() for showing the objects data in the statusBar
    Events.sendEvent(new Event(Events.ON_SELECT, getOfficeListCtrl().getListBoxOffice(), getSelectedOffice()));

    // refresh master-detail MASTERS data
    getOfficeDetailCtrl().getBinder().loadAll();

    // EXTRA: if we have a longtext field under the listbox, so we must
View Full Code Here

TOP

Related Classes of org.zkoss.zk.ui.event.Event

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.