Examples of SerializableEventListener


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

      // autoCreate EventQueue
      EventQueue eq = EventQueues.lookup("ApplicationEventQueue", EventQueues.APPLICATION, true);

      // listen
      eq.subscribe(new SerializableEventListener() {
        private static final long serialVersionUID = 1L;

        @SuppressWarnings("unchecked")
        public void onEvent(Event event) throws Exception {
          System.out.println("ApplicationEventQueue onEvent");

          if (event.getName().equals("APPLICATION_NOTIFICATION")) {
            Map<String, Object> map = (Map<String, Object>) event.getData();
            showNotification(map);
          }
        }
      });
    } else {
      // Get the EventQueue
      EventQueue eq = EventQueues.lookup("ApplicationEventQueue", EventQueues.APPLICATION, false);

      // NEW listen
      eq.subscribe(new SerializableEventListener() {
        private static final long serialVersionUID = 1L;

        @SuppressWarnings("unchecked")
        public void onEvent(Event event) throws Exception {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.