Package org.zkoss.zul

Examples of org.zkoss.zul.Menuitem.addEventListener()


    final Menuitem changeToTreeMenu = new Menuitem();
    changeToTreeMenu.setLabel(Labels.getLabel("menu_Item_backToTree"));
    changeToTreeMenu.setImage("/images/icons/refresh2_yellow_16x16.gif");
    changeToTreeMenu.setParent(menuBar);
    changeToTreeMenu.addEventListener("onClick", new EventListener() {
      @Override
      public void onEvent(Event event) throws Exception {
        // get an instance of the borderlayout defined in the
        // index.zul-file
        final Borderlayout bl = (Borderlayout) Path.getComponent("/outerIndexWindow/borderlayoutMain");
View Full Code Here


    @Listen("onSniffMenu=window")
    public void sniffMenu() {
        List<Menuitem> mis = ComponentUtil.find(Menuitem.class, menu, 16);
        for (Iterator<Menuitem> iterator = mis.iterator(); iterator.hasNext(); ) {
            Menuitem mi = iterator.next();
            mi.addEventListener("onClick", new EventListener<Event>() {
                @Override
                public void onEvent(Event event) throws Exception {
                    Events.echoEvent("onInterceptMenu", self, event.getTarget());
                }
            });
View Full Code Here

 
 
 
  public static void bindStandardOptions(final Window source, final String gridName, final String targetWindow){
    Menuitem createItem =(Menuitem)source.getFellow("createItem");
    createItem.addEventListener("onClick", new EventListener(){
      public void onEvent(Event event) throws Exception {
        openDetails(source, gridName, "1", targetWindow);
        Events.postEvent("onRefresh", source, null);
       
      }
View Full Code Here

        Events.postEvent("onRefresh", source, null);
       
      }
    });
    Menuitem showItem =(Menuitem)source.getFellow("showItem");
    showItem.addEventListener("onClick", new EventListener(){
      public void onEvent(Event event) throws Exception {
        openDetails(source, gridName, "2", targetWindow);
        Events.postEvent("onRefresh", source, null);
       
      }
View Full Code Here

        openDetails(source, gridName, "2", targetWindow);
        Events.postEvent("onRefresh", source, null);
       
      }
    });    Menuitem editItem=(Menuitem)source.getFellow("editItem");
    editItem.addEventListener("onClick", new EventListener(){
      public void onEvent(Event event) throws Exception {
        openDetails(source, gridName, "3", targetWindow);
        Events.postEvent("onRefresh", source, null);
       
      }
View Full Code Here

        Events.postEvent("onRefresh", source, null);
       
      }
    });
    Menuitem deleteItem=(Menuitem)source.getFellow("deleteItem");
    deleteItem.addEventListener("onClick", new EventListener(){
      public void onEvent(Event event) throws Exception {
        openDetails(source, gridName, "4", targetWindow);
        Events.postEvent("refresh", source, null);
      }
    });
View Full Code Here

    Menu actionsMenu=new Menu("Actions");
    menubar.appendChild(actionsMenu);
    Menupopup popup=new Menupopup();
    actionsMenu.appendChild(popup);
    Menuitem createItem =new Menuitem("Create");
    createItem.addEventListener("onClick", new EventListener(){
      public void onEvent(Event event) throws Exception {
        Map<String, ArrayList<String>> map=new HashMap<String, ArrayList<String>>();
        ArrayList<String> options=new ArrayList<String>();
        options.add("create");
        map.put("options", options);
View Full Code Here

        openDetails(map);
       
      }
    });
    Menuitem showItem =new Menuitem("Show");
    showItem.addEventListener("onClick", new EventListener(){
      public void onEvent(Event event) throws Exception {
        Map<String, ArrayList<String>> map=new HashMap<String, ArrayList<String>>();
        ArrayList<String> options=new ArrayList<String>();
        options.add("show");
        map.put("options", options);
View Full Code Here

        openDetails(map);
       
      }
    });
    Menuitem editItem=new Menuitem("Edit");
    editItem.addEventListener("onClick", new EventListener(){
      public void onEvent(Event event) throws Exception {
        Map<String, ArrayList<String>> map=new HashMap<String, ArrayList<String>>();
        ArrayList<String> options=new ArrayList<String>();
        options.add("edit");
        map.put("options", options);
View Full Code Here

        openDetails(map);
       
      }
    });
    Menuitem deleteItem=new Menuitem("Delete");
    deleteItem.addEventListener("onClick", new EventListener(){
      public void onEvent(Event event) throws Exception {
        Map<String, ArrayList<String>> map=new HashMap<String, ArrayList<String>>();
        ArrayList<String> options=new ArrayList<String>();
        options.add("delete");
        map.put("options", options);
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.