Package org.exoplatform.portal.config.model

Examples of org.exoplatform.portal.config.model.PageNavigation


       * @return
       */
      private PageNavigation getBestMatchNavigation(List<PageNavigation> listNav, String[] pathNodes)
      {
         int temporalMaximalMatching = 0;
         PageNavigation temporalBestNavigation = listNav.get(0);
        
         for(PageNavigation nav : listNav)
         {
            int currentNumberOfMatching = countNumberOfMatchedPathNodes(nav, pathNodes);
           
View Full Code Here


      private void removePageNode(Page page, Event<UIPageBrowser> event) throws Exception
      {
         UIPageBrowser uiPageBrowser = event.getSource();
         DataStorage dataService = uiPageBrowser.getApplicationComponent(DataStorage.class);

         PageNavigation pageNavigation = null;
         UIPortalApplication portalApplication = Util.getUIPortalApplication();

         List<PageNavigation> listPageNavigation = portalApplication.getNavigations();

         for (PageNavigation pageNvg : listPageNavigation)
         {
            if (pageNvg.getOwnerType().equals(PortalConfig.USER_TYPE))
            {
               pageNavigation = pageNvg;
               break;
            }
         }
         UIPortal uiPortal = Util.getUIPortal();

         PageNode tobeRemoved = null;
         List<PageNode> nodes = pageNavigation.getNodes();
         for (PageNode pageNode : nodes)
         {
            String pageReference = pageNode.getPageReference();
            String pageId = page.getPageId();

            if (pageReference != null && pageReference.equals(pageId))
            {
               tobeRemoved = pageNode;
               break;
            }
         }

         if (tobeRemoved != null)
         {
            // Remove pageNode
            pageNavigation.getNodes().remove(tobeRemoved);

            // Update navigation and UserToolbarGroupPortlet

            String pageRef = tobeRemoved.getPageReference();
            if (pageRef != null && pageRef.length() > 0)
View Full Code Here

         pageNode.setLabel(pageNode.getName());
      }

      UIPageNodeSelector uiNodeSelector = getChild(UIPageNodeSelector.class);
      PageNode selectedNode = uiNodeSelector.getSelectedPageNode();
      PageNavigation nav = uiNodeSelector.getSelectedNavigation();
      if(nav.getOwnerType().equals(PortalConfig.USER_TYPE))
         pageNode.setUri(pageNode.getName());
      else
      {
         if (selectedNode != null)
         {
View Full Code Here

   }

   public PageNode getSelectedPageNode()
   {
      UIPageNodeSelector uiPageNodeSelector = getChild(UIPageNodeSelector.class);
      PageNavigation nav = uiPageNodeSelector.getSelectedNavigation();
      if(nav.getOwnerType().equals(PortalConfig.USER_TYPE))
         return null;
      return uiPageNodeSelector.getSelectedPageNode();
   }
View Full Code Here

   }

   public void loadTreeNodes() throws Exception
   {
      WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
      treeNode_ = new TreeNode(new PageNode(), new PageNavigation(), true);
      List<PageNavigation> listNavigations = Util.getUIPortalApplication().getNavigations();
     
      for (PageNavigation nav : rearrangeNavigations(listNavigations))
      {
         if (!showUserNavigation && nav.getOwnerType().equals("user"))
         {
            continue;
         }
         PageNavigation filterNav = PageNavigationUtils.filter(nav, context.getRemoteUser());
         treeNode_.setChildren(filterNav.getNodes(), filterNav);
      }
   }
View Full Code Here

      return treeNode_;
   }

   public PageNavigation getSelectedNavigation() throws Exception
   {
      PageNavigation nav = Util.getUIPortal().getSelectedNavigation();
      if (nav != null)
         return nav;
      if (Util.getUIPortal().getNavigations().size() < 1)
         return null;
      return Util.getUIPortal().getNavigations().get(0);
View Full Code Here

         UIPortalNavigation uiNavigation = event.getSource();
         UIPortal uiPortal = Util.getUIPortal();
         String uri = event.getRequestContext().getRequestParameter(OBJECTID);
         int index = uri.lastIndexOf("::");
         String id = uri.substring(index + 2);
         PageNavigation selectNav = null;
         if (index <= 0)
         {
            selectNav = uiPortal.getSelectedNavigation();
         }
         else
View Full Code Here

         String uri = event.getRequestContext().getRequestParameter(OBJECTID);
         int index = uri.lastIndexOf("::");
         String id = uri.substring(index + 2);

         // get PageNavigation by uri
         PageNavigation selectNav = null;

         String navId = uri.substring(0, index);
         selectNav = PageNavigationUtils.findNavigationByID(all_Navigations, Integer.parseInt(navId));
         if(selectNav == null)
         {
View Full Code Here

         int index = uri.lastIndexOf("::");
         String id = uri.substring(index + 2);

         // get PageNavigation by uri
         PageNavigation selectNav = null;

         String navId = uri.substring(0, index);
        
         //TODO: Minh Hoang TO
         //selectNav = uiPortal.getPageNavigation(Integer.parseInt(navId));
View Full Code Here

         if (treeNode.getChildren().size() > 0)
         {
            for (TreeNode child : treeNode.getChildren())
            {
               PageNode expandNode = child.getNode();
               PageNavigation selectNav = child.getNavigation();

               // set node to child tree
               if (expandNode.getChildren().size() > 0)
               {
                  child.setChildren(expandNode.getChildren(), selectNav);
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.config.model.PageNavigation

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.