Package org.exoplatform.portal.config.model

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


   }

   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

   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

   }

   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

   {
      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

         {
            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

         {
            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

         //TODO: Minh Hoang TO
         //selectNav = uiPortal.getPageNavigation(Integer.parseInt(navId));
         selectNav = uiPortal.getSelectedNavigation();
        
         // get PageNode by uri
         PageNode expandNode = PageNavigationUtils.searchPageNodeByUri(selectNav, id);

         TreeNode expandTree = null;
         if (treeNode.getChildren() != null)
         {
            expandTree = treeNode.getChildByPath(uri, treeNode);
View Full Code Here

         if (!event.getSource().isEditMode())
         {
            return;
         }
         PageNode pageNode = uiPageNodeSelector.getSelectedPageNode();

         if (pageNode == null && uiForm.isFirstTime())
         {
            uiForm.setShowPublicationDate(false);
            uiForm.setFirstTime(false);
            UIPortal uiPortal = Util.getUIPortal();
            uiPageNodeSelector.selectNavigation(uiPortal.getSelectedNavigation());
            if (uiPortal.getSelectedNode() != null)
            {
               uiPageNodeSelector.selectPageNodeByUri(uiPortal.getSelectedNode().getUri());
            }
            pageNode = uiPageNodeSelector.getSelectedPageNode();
         }

         if (pageNode == null)
         {
            uiForm.setShowPublicationDate(false);
            return;
         }
         UserPortalConfigService configService = uiWizard.getApplicationComponent(UserPortalConfigService.class);
         String accessUser = event.getRequestContext().getRemoteUser();
         Page page = null;
         if (pageNode.getPageReference() != null)
            page = configService.getPage(pageNode.getPageReference(), accessUser);
         if (page == null)
         {
            uiPortalApp.addMessage(new ApplicationMessage("UIWizardPageSetInfo.msg.null", null));
            uiForm.reset();
            uiForm.setShowPublicationDate(false);
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);
               }

               // expand child tree
               expandAllNode(child);
            }
View Full Code Here

TOP

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

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.