Examples of PageNode


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

         if(pathNodes.length == 0)
         {
           return getDefaultNode(targetedNav);
         }
        
         PageNode currentNode = targetedNav.getNode(pathNodes[0]);
         if(currentNode == null)
         {
            return getDefaultNode(targetedNav);
         }
        
         PageNode tempNode = null;
        
         for(int i = 1; i < pathNodes.length; i++)
         {
            tempNode = currentNode.getChild(pathNodes[i]);
            if (tempNode == null)
View Full Code Here

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

       * @param nav
       * @return
       */
      private PageNode getDefaultNode(PageNavigation nav)
      {
         PageNode defaultNode = null;
         try
         {
            if (nav != null && nav.getNodes().size() > 0)
            {
               WebuiRequestContext context = Util.getPortalRequestContext();
               ExoContainer appContainer = context.getApplication().getApplicationServiceContainer();
               UserPortalConfigService userPortalConfigService = (UserPortalConfigService)appContainer.getComponentInstanceOfType(UserPortalConfigService.class);
              
               for (PageNode pageNode : nav.getNodes())
               {
                  Page page = userPortalConfigService.getPage(pageNode.getPageReference(), context.getRemoteUser());
                  if (page != null)
                  {
                     defaultNode = pageNode;
                     break;
                  }
               }
            }
            else
            {
               return null;
            }
         }
         catch (Exception e)
         {
            e.printStackTrace();
            return null;
         }
         if (defaultNode != null && !("notfound".equals(defaultNode.getName())))
         {
            return defaultNode;
         }
         else
         {
View Full Code Here

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

         if(pathNodes.length == 0)
         {
            nodes.add(getDefaultNode(nav));
            return nodes;
         }
         PageNode startNode = nav.getNode(pathNodes[0]);
         if (startNode == null)
         {
            nodes.add(getDefaultNode(nav));
            return nodes;
         }
         nodes.add(startNode);

         for (int i = 1; i < pathNodes.length; i++)
         {
            startNode = startNode.getChild(pathNodes[i]);
            if(startNode == null)
            {
               break;
            }
            else
View Full Code Here

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

               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)
            {
               // Remove from cache
               uiPortal.clearUIPage(pageRef);
            }
View Full Code Here

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

   }

   public void invokeSetBindingBean(Object bean) throws Exception
   {
      super.invokeSetBindingBean(bean);
      PageNode node = (PageNode)bean;
      if(!getUIFormCheckBoxInput(SHOW_PUBLICATION_DATE).isChecked())
      {
        node.setVisible(getUIFormCheckBoxInput(VISIBLE).isChecked())
      }
      Calendar cal = getUIFormDateTimeInput(START_PUBLICATION_DATE).getCalendar();
      Date date = (cal != null) ? cal.getTime() : null;
      node.setStartPublicationDate(date);
      cal = getUIFormDateTimeInput(END_PUBLICATION_DATE).getCalendar();
      date = (cal != null) ? cal.getTime() : null;
      node.setEndPublicationDate(date);
   }
View Full Code Here

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

   public PageNode getPageNode() throws Exception
   {
      if (isEditMode)
      {
         PageNode pageNode = getSelectedPageNode();
         PageNode clonedNode = (pageNode != null) ? pageNode.clone() : null;
         invokeSetBindingBean(clonedNode);
         if (clonedNode.getLabel() == null || clonedNode.getLabel().trim().length() == 0)
         {
            clonedNode.setLabel(clonedNode.getName());
         }
         return clonedNode;
      }

      PageNode pageNode = new PageNode();
      invokeSetBindingBean(pageNode);
      if (pageNode.getLabel() == null || pageNode.getLabel().trim().length() == 0)
      {
         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)
         {
            pageNode.setUri(selectedNode.getUri() + "/" + pageNode.getName());
         }
         else
            pageNode.setUri(pageNode.getName());
      }
      return pageNode;
View Full Code Here

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

   }

   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"))
View Full Code Here

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

   {
      if (selectedNode_ != null && node.getUri().equals(selectedNode_.getUri()))
         return true;
      if (selectedParent_ == null || selectedParent_ instanceof PageNavigation)
         return false;
      PageNode pageNode = (PageNode)selectedParent_;
      return node.getUri().equals(pageNode.getUri());
   }
View Full Code Here

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

         {
            String navId = uri.substring(0, index);
            //selectNav = uiPortal.getPageNavigation(Integer.parseInt(navId));
            selectNav = uiPortal.getSelectedNavigation();
         }
         PageNode selectNode = PageNavigationUtils.searchPageNodeByUri(selectNav, id);
         uiNavigation.selectedNode_ = selectNode;
         String parentUri = null;
         index = uri.lastIndexOf("/");
         if (index > 0)
            parentUri = uri.substring(0, index);
View Full Code Here

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

         {
            return;
         }
        
         // get PageNode by uri
         PageNode expandNode = PageNavigationUtils.searchPageNodeByUri(selectNav, id);

         TreeNode expandTree = null;
         if (treeNode.getChildren() != null)
         {
            expandTree = treeNode.getChildByPath(uri, treeNode);
         }

         if(expandTree != null)
         {
            expandTree.setChildren(expandNode.getChildren(), selectNav);
         }
        
         event.getRequestContext().addUIComponentToUpdateByAjax(uiNavigation);
      }
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.