Package org.exoplatform.webui.core

Examples of org.exoplatform.webui.core.UITree


   public UIPortalNodeSelector() throws Exception
   {
      addChild(UIRightClickPopupMenu.class, "UIPortalNodeSelectorPopupMenu", null).setRendered(false);

      UITree uiTree = addChild(UITree.class, null, "TreeNodeSelector");
      uiTree.setIcon("DefaultPageIcon");
      uiTree.setSelectedIcon("DefaultPageIcon");
      uiTree.setBeanIdField("uri");
      uiTree.setBeanLabelField("resolvedLabel");
      uiTree.setBeanIconField("icon");

      UIRightClickPopupMenu uiPopupMenu = createUIComponent(UIRightClickPopupMenu.class, "PortalNodePopupMenu", null);
      uiPopupMenu.setActions(new String[]{"AddNode", "EditPageNode", "EditSelectedNode", "CopyNode", "CloneNode",
         "CutNode", "DeleteNode", "MoveUp", "MoveDown"});
      uiTree.setUIRightClickPopupMenu(uiPopupMenu);
   }
View Full Code Here


      {
         if (navigations.get(i).getId() != id)
            continue;
         selectedNode = new SelectedNode(navigations.get(i), null, null);
         selectPageNodeByUri(null);
         UITree uiTree = getChild(UITree.class);
         uiTree.setSibbling(navigations.get(i).getNodes());
      }
   }
View Full Code Here

   public void selectPageNodeByUri(String uri)
   {
      if (selectedNode == null)
         return;
      UITree tree = getChild(UITree.class);
      List<?> sibbling = tree.getSibbling();
      tree.setSibbling(null);
      tree.setParentSelected(null);
      selectedNode.setNode(searchPageNodeByUri(selectedNode.getPageNavigation(), uri));
      if (selectedNode.getNode() != null)
      {
         tree.setSelected(selectedNode.getNode());
         tree.setChildren(selectedNode.getNode().getChildren());
         return;
      }
      tree.setSelected(null);
      tree.setChildren(null);
      tree.setSibbling(sibbling);
   }
View Full Code Here

   public PageNode searchPageNodeByUri(PageNavigation pageNav, String uri)
   {
      if (pageNav == null || uri == null)
         return null;
      List<PageNode> pageNodes = pageNav.getNodes();
      UITree uiTree = getChild(UITree.class);
      for (PageNode ele : pageNodes)
      {
         PageNode returnPageNode = searchPageNodeByUri(ele, uri, uiTree);
         if (returnPageNode == null)
            continue;
         if (uiTree.getSibbling() == null)
            uiTree.setSibbling(pageNodes);
         return returnPageNode;
      }
      return null;
   }
View Full Code Here

    private Group selectGroup_;

    public UIGroupMembershipSelector() throws Exception {
        UIBreadcumbs uiBreadcumbs = addChild(UIBreadcumbs.class, "BreadcumbGroupSelector", "BreadcumbGroupSelector");
        UITree tree = addChild(UITree.class, "UITreeGroupSelector", "TreeGroupSelector");
        tree.setIcon("GroupAdminIcon");
        tree.setSelectedIcon("PortalIcon");
        tree.setBeanIdField("id");
        tree.setBeanLabelField("label");
        tree.setEscapeHTML(true);
        uiBreadcumbs.setBreadcumbsStyle("UIExplorerHistoryPath");
    }
View Full Code Here

     * @see org.exoplatform.webui.core.UIComponent#processRender(org.exoplatform.webui.application.WebuiRequestContext)
     */
    @Override
    public void processRender(WebuiRequestContext context) throws Exception {
        OrganizationService service = getApplicationComponent(OrganizationService.class);
        UITree tree = getChild(UITree.class);
        if (tree != null && tree.getSibbling() == null) {
            Collection<?> sibblingsGroup = service.getGroupHandler().findGroups(null);
            tree.setSibbling(sibblingsGroup);
        }

        super.processRender(context);
    }
View Full Code Here

    public void changeGroup(String groupId) throws Exception {
        OrganizationService service = getApplicationComponent(OrganizationService.class);
        UIBreadcumbs uiBreadcumb = getChild(UIBreadcumbs.class);
        uiBreadcumb.setPath(getPath(null, groupId));

        UITree tree = getChild(UITree.class);
        Collection<?> sibblingGroup;

        if (groupId == null) {
            sibblingGroup = service.getGroupHandler().findGroups(null);
            tree.setSibbling(sibblingGroup);
            tree.setChildren(null);
            tree.setSelected(null);
            selectGroup_ = null;
            return;
        }

        selectGroup_ = service.getGroupHandler().findGroupById(groupId);
        String parentGroupId = null;
        if (selectGroup_ != null) {
            parentGroupId = selectGroup_.getParentId();
        }
        Group parentGroup = null;
        if (parentGroupId != null) {
            parentGroup = service.getGroupHandler().findGroupById(parentGroupId);
        }

        Collection<Group> childrenGroup = service.getGroupHandler().findGroups(selectGroup_);
        sibblingGroup = service.getGroupHandler().findGroups(parentGroup);

        tree.setSibbling(sibblingGroup);
        tree.setChildren(childrenGroup);
        tree.setSelected(selectGroup_);
        tree.setParentSelected(parentGroup);
    }
View Full Code Here

   private Group selectedGroup;

   public UIGroupSelector() throws Exception
   {
      UIBreadcumbs uiBreadcumbs = addChild(UIBreadcumbs.class, "BreadcumbGroupSelector", "BreadcumbGroupSelector");
      UITree tree = addChild(UITree.class, "UITreeGroupSelector", "TreeGroupSelector");
      OrganizationService service = getApplicationComponent(OrganizationService.class);
      Collection sibblingsGroup = service.getGroupHandler().findGroups(null);

      tree.setSibbling((List)sibblingsGroup);
      tree.setIcon("GroupAdminIcon");
      tree.setSelectedIcon("PortalIcon");
      tree.setBeanIdField("id");
      //tree.setBeanLabelField("groupName");
      tree.setBeanLabelField("label");
      uiBreadcumbs.setBreadcumbsStyle("UIExplorerHistoryPath");
   }
View Full Code Here

   {
      OrganizationService service = getApplicationComponent(OrganizationService.class);
      UIBreadcumbs uiBreadcumb = getChild(UIBreadcumbs.class);
      uiBreadcumb.setPath(getPath(null, groupId));

      UITree tree = getChild(UITree.class);
      Collection sibblingGroup;

      if (groupId == null)
      {
         sibblingGroup = service.getGroupHandler().findGroups(null);
         tree.setSibbling((List)sibblingGroup);
         tree.setChildren(null);
         tree.setSelected(null);
         selectedGroup = null;
         return;
      }

      selectedGroup = service.getGroupHandler().findGroupById(groupId);
      String parentGroupId = null;
      if (selectedGroup != null)
         parentGroupId = selectedGroup.getParentId();
      Group parentGroup = null;
      if (parentGroupId != null)
         parentGroup = service.getGroupHandler().findGroupById(parentGroupId);

      Collection childrenGroup = service.getGroupHandler().findGroups(selectedGroup);
      sibblingGroup = service.getGroupHandler().findGroups(parentGroup);

      tree.setSibbling((List)sibblingGroup);
      tree.setChildren((List)childrenGroup);
      tree.setSelected(selectedGroup);
      tree.setParentSelected(parentGroup);
   }
View Full Code Here

   {
      public void execute(Event<UITree> event) throws Exception
      {
         String groupId = event.getRequestContext().getRequestParameter(OBJECTID);
         UIGroupSelector uiSelector = null;
         UITree uicom = event.getSource();
         uiSelector = uicom.getParent();
         uiSelector.changeGroup(groupId);

         UIForm uiForm = uiSelector.getAncestorOfType(UIForm.class);
         UIPopupWindow uiPopup = uiSelector.getParent();
         uiPopup.setShow(true);
View Full Code Here

TOP

Related Classes of org.exoplatform.webui.core.UITree

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.