Package com.centraview.common.menu

Examples of com.centraview.common.menu.NestedMenuItem


      // set up the left nav.
      GlobalMasterLists gml = GlobalMasterLists.getGlobalMasterLists(dataSource);
      ListPreference listPreference = user.getListPreference(listType);
      Vector vecViewList = gml.getViewComboData(listPreference);
      String URL = "/common/new_view.do?listType="+listType+"&moduleId="+moduleId;
      NestedMenuItem primaryMenuItem = new NestedMenuItem("Views", URL, true);
      ArrayList secondaryMenuItems = new ArrayList();
      Iterator viewIterator = vecViewList.iterator();
      while (viewIterator.hasNext()) {
        DDNameValue view = (DDNameValue)viewIterator.next();
        int viewId = view.getId();
        String viewName = view.getName();
        boolean selected = false;
        if (selectedId.equals(String.valueOf(viewId))) {
          selected = true;
        }
        secondaryMenuItems.add(new NestedMenuItem(viewName, "/common/edit_view.do?viewId="+viewId+"&listType="+listType, selected));
      }
      primaryMenuItem.setItems(secondaryMenuItems);
      ArrayList primaryMenuItems = new ArrayList();
      primaryMenuItems.add(primaryMenuItem);
      LeftNavigation leftNav = new LeftNavigation("Custom Views", primaryMenuItems);
      request.setAttribute("leftNav", leftNav);
      FORWARD_final = FORWARD_displaynewview;
View Full Code Here


        // set up the left nav.
        GlobalMasterLists gml = GlobalMasterLists.getGlobalMasterLists(dataSource);
        ListPreference listPreference = user.getListPreference(listType);
        Vector vecViewList = gml.getViewComboData(listPreference);
        String URL = "/common/new_view.do?listType=" + listType + "&moduleId=" + moduleId;
        NestedMenuItem primaryMenuItem = new NestedMenuItem("Views", URL, true);
        ArrayList secondaryMenuItems = new ArrayList();
        Iterator viewIterator = vecViewList.iterator();
        while (viewIterator.hasNext()) {
          DDNameValue view = (DDNameValue) viewIterator.next();
          int viewId = view.getId();
          String viewName = view.getName();
          boolean selected = false;
          if (viewId == selectedViewId) {
            selected = true;
          }
          secondaryMenuItems.add(new NestedMenuItem(viewName, "/common/edit_view.do?viewId="
              + selectedViewId + "&listType=" + listType, selected));
        }
        primaryMenuItem.setItems(secondaryMenuItems);
        ArrayList primaryMenuItems = new ArrayList();
        primaryMenuItems.add(primaryMenuItem);
        LeftNavigation leftNav = new LeftNavigation("Custom Views", primaryMenuItems);
        request.setAttribute("leftNav", leftNav);
View Full Code Here

      advancedSearchForm.set("moduleId", new Integer(moduleId));
    }

    // I now have the list of saved searches, lets populate the menu bean.
    // The Ids are stored as Numbers on the hashmap
    NestedMenuItem primaryMenuItem = new NestedMenuItem("Saved Searches", "/advancedsearch/dispatch.do?resetForm=true", true);
    ArrayList secondaryMenuItems = new ArrayList();
    Set savedSearchIds = savedSearches.keySet();
    Iterator idIterator = savedSearchIds.iterator();
    while (idIterator.hasNext()) {
      Number searchId = (Number)idIterator.next();
      String searchName = (String)savedSearches.get(searchId);
      boolean selected = false;
      if (selectedSearchId.equals(searchId.toString())) {
        selected = true;
      }
      secondaryMenuItems.add(new NestedMenuItem(searchName, "/advancedsearch/dispatch.do?searchId=" + searchId.toString(), selected));
    }
    primaryMenuItem.setItems(secondaryMenuItems);
    ArrayList primaryMenuItems = new ArrayList();
    primaryMenuItems.add(primaryMenuItem);
    LeftNavigation leftNav = new LeftNavigation("Advanced Search", primaryMenuItems);
    request.setAttribute("leftNav", leftNav);
View Full Code Here

TOP

Related Classes of com.centraview.common.menu.NestedMenuItem

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.