Examples of UITree


Examples of org.apache.myfaces.tobago.component.UITree

  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UITree component = (UITree) uiComponent;
    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    if (markup != null) {
      if (!markup.isLiteralText()) {
        component.setValueExpression("markup", markup);
      } else {
        component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
      }
    }
    if (state != null) {
      if (!state.isLiteralText()) {
        component.setValueExpression("state", state);
      /*} else {
        component.setState(state.getExpressionString());*/
      }
    }
    if (showRoot != null) {
      if (!showRoot.isLiteralText()) {
        component.setValueExpression("showRoot", showRoot);
      } else {
        component.setShowRoot(Boolean.parseBoolean(showRoot.getExpressionString()));
      }
    }
    if (required != null) {
      if (!required.isLiteralText()) {
        component.setValueExpression("required", required);
      } else {
        component.setRequired(Boolean.parseBoolean(required.getExpressionString()));
      }
    }
    if (showRootJunction != null) {
      if (!showRootJunction.isLiteralText()) {
        component.setValueExpression("showRootJunction", showRootJunction);
      } else {
        component.setShowRootJunction(Boolean.parseBoolean(showRootJunction.getExpressionString()));
      }
    }
    if (selectable != null) {
      component.setValueExpression("selectable", selectable);
    }

  }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UITree

  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UITree component = (UITree) uiComponent;
    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    if (markup != null) {
      if (!markup.isLiteralText()) {
        component.setValueExpression("markup", markup);
      } else {
        component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
      }
    }
    if (var != null) {
      component.setValueExpression("var", var);
    }

    if (state != null) {
      if (!state.isLiteralText()) {
        component.setValueExpression("state", state);
      /*} else {
        component.setState(state.getExpressionString());*/
      }
    }
    if (showRoot != null) {
      if (!showRoot.isLiteralText()) {
        component.setValueExpression("showRoot", showRoot);
      } else {
        component.setShowRoot(Boolean.parseBoolean(showRoot.getExpressionString()));
      }
    }
    if (value != null) {
      component.setValueExpression("value", value);
    }

    if (showRootJunction != null) {
      if (!showRootJunction.isLiteralText()) {
        component.setValueExpression("showRootJunction", showRootJunction);
      } else {
        component.setShowRootJunction(Boolean.parseBoolean(showRootJunction.getExpressionString()));
      }
    }
    if (selectable != null) {
      component.setValueExpression("selectable", selectable);
    }

  }
View Full Code Here

Examples of org.exoplatform.webui.core.UITree

               selectedNode.getPageNavigation().getNodes().remove(selectedNode.getNode());
            }
         }
         event.getRequestContext().addUIComponentToUpdateByAjax(uiNodeSelector);
         uiNodeSelector.setCopyNode(null);
         UITree uitree = uiNodeSelector.getChild(UITree.class);
         UIRightClickPopupMenu popup = uitree.getUIRightClickPopupMenu();
         popup.setActions(new String[]{"AddNode", "EditPageNode", "EditSelectedNode", "CopyNode", "CutNode",
            "CloneNode", "DeleteNode", "MoveUp", "MoveDown"});

         UserPortalConfigService service = uiPopupMenu.getApplicationComponent(UserPortalConfigService.class);
         if (targetNode == null)
View Full Code Here

Examples of org.exoplatform.webui.core.UITree

   private Collection childrenGroup_;

   @SuppressWarnings("unchecked")
   public UIGroupExplorer() throws Exception
   {
      UITree tree = addChild(UITree.class, null, "TreeGroupExplorer");
      OrganizationService service = getApplicationComponent(OrganizationService.class);
      sibblingsGroup_ = service.getGroupHandler().findGroups(null);

      //  if not administrator
      if (!GroupManagement.isAdministrator(null))
         sibblingsGroup_ = GroupManagement.getRelatedGroups(null, sibblingsGroup_);

      tree.setSibbling((List)convertGroups(sibblingsGroup_));
      tree.setIcon("GroupAdminIcon");
      tree.setSelectedIcon("PortalIcon");
      tree.setBeanIdField("id");
      //tree.setBeanLabelField("groupName");
      tree.setBeanLabelField("encodedLabel");
      tree.setMaxTitleCharacter(25);
   }
View Full Code Here

Examples of org.exoplatform.webui.core.UITree

      UIGroupManagement uiGroupManagement = this.getParent();
      UIBreadcumbs uiBreadcumb = uiGroupManagement.getChild(UIBreadcumbs.class);
      uiBreadcumb.setPath(getPath(null, groupId));

      UITree uiTree = getChild(UITree.class);
      UIGroupDetail uiGroupDetail = uiGroupManagement.getChild(UIGroupDetail.class);
      UIGroupInfo uiGroupInfo = uiGroupDetail.getChild(UIGroupInfo.class);

      if (groupId == null)
      {
         sibblingsGroup_ = service.getGroupHandler().findGroups(null);
         //    if not administrator
         if (!GroupManagement.isAdministrator(null))
            sibblingsGroup_ = GroupManagement.getRelatedGroups(null, sibblingsGroup_);
         uiTree.setSibbling((List)convertGroups(sibblingsGroup_));
         uiTree.setSelected(null);
         uiTree.setChildren(null);
         uiTree.setParentSelected(null);
         selectedGroup_ = null;
         uiGroupInfo.setGroup(null);
         return;
      }

      if (groupId != null)
      {
         selectedGroup_ = service.getGroupHandler().findGroupById(groupId);
      }
      else
      {
         selectedGroup_ = null;
      }

      String parentGroupId = null;
      if (selectedGroup_ != null)
         parentGroupId = selectedGroup_.getParentId();
      Group parentGroup = null;
      if (parentGroupId != null)
         parentGroup = service.getGroupHandler().findGroupById(parentGroupId);
      childrenGroup_ = service.getGroupHandler().findGroups(selectedGroup_);
      sibblingsGroup_ = service.getGroupHandler().findGroups(parentGroup);

      // if not administrator
      if (!GroupManagement.isAdministrator(null))
      {
         childrenGroup_ = GroupManagement.getRelatedGroups(null, childrenGroup_);
         sibblingsGroup_ = GroupManagement.getRelatedGroups(null, sibblingsGroup_);
      }

      for (Object group : sibblingsGroup_)
      {
         if (selectedGroup_ != null && ((Group)group).getId().equals(selectedGroup_.getId()))
         {
            selectedGroup_ = (Group)group;
            break;
         }
      }
      uiGroupInfo.setGroup(selectedGroup_);

      uiTree.setSibbling((List)convertGroups(sibblingsGroup_));
      uiTree.setChildren((List)convertGroups(childrenGroup_));
      uiTree.setSelected(new UIGroup(selectedGroup_));
      uiTree.setParentSelected(parentGroup);
   }
View Full Code Here

Examples of org.exoplatform.webui.core.UITree

    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");
        tree.setEscapeHTML(true);
        uiBreadcumbs.setBreadcumbsStyle("UIExplorerHistoryPath");
    }
View Full Code Here

Examples of org.exoplatform.webui.core.UITree

    private Group selectGroup_;

    @SuppressWarnings("unchecked")
    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");
        tree.setEscapeHTML(true);
        uiBreadcumbs.setBreadcumbsStyle("UIExplorerHistoryPath");
    }
View Full Code Here

Examples of org.exoplatform.webui.core.UITree

    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((List) 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 childrenGroup = service.getGroupHandler().findGroups(selectGroup_);
        sibblingGroup = service.getGroupHandler().findGroups(parentGroup);

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

Examples of org.exoplatform.webui.core.UITree

    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((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

Examples of org.exoplatform.webui.core.UITree

    public static class ChangeNodeActionListener extends EventListener<UITree> {
        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
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.