Package org.exoplatform.portal.config.model

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


      loadNavigations();
   }

   private void loadNavigations() throws Exception
   {
      PageNavigation portalSelectedNav = Util.getUIPortal().getSelectedNavigation();
      if (portalSelectedNav != null)
      {
         selectNavigation(portalSelectedNav);
         PageNode portalSelectedNode = Util.getUIPortal().getSelectedNode();
         if (portalSelectedNode != null)
View Full Code Here


         UIPageNodeForm uiNodeForm = uiManagementPopup.createUIComponent(UIPageNodeForm.class, null, null);
         uiNodeForm.setValues(null);
         uiManagementPopup.setUIComponent(uiNodeForm);

         Object parent = null;
         PageNavigation edittedNavigation = uiNodeSelector.getEdittedNavigation();
         List<PageNode> pageNodes = edittedNavigation.getNodes();
         if (uri != null && uri.trim().length() > 0)
         {
            for (PageNode pageNode : pageNodes)
            {
               parent = PageNavigationUtils.searchPageNodeByUri(pageNode, uri);
View Full Code Here

         WebuiRequestContext ctx = event.getRequestContext();
         UIRightClickPopupMenu popupMenu = event.getSource();
         UIApplication uiApp = ctx.getUIApplication();
         String uri = event.getRequestContext().getRequestParameter(UIComponent.OBJECTID);
         UINavigationNodeSelector uiNodeSelector = popupMenu.getAncestorOfType(UINavigationNodeSelector.class);
         PageNavigation edittedNav = uiNodeSelector.getEdittedNavigation();
         Object obj = PageNavigationUtils.searchParentNode(edittedNav, uri);
         PageNode selectedNode = PageNavigationUtils.searchPageNodeByUri(edittedNav, uri);
         String pageId = selectedNode.getPageReference();

         UserPortalConfigService service = uiApp.getApplicationComponent(UserPortalConfigService.class);
View Full Code Here

         UINavigationManagement uiManagement = uiNodeSelector.getParent();
         Class<?>[] childrenToRender = new Class<?>[]{UINavigationNodeSelector.class};
         uiManagement.setRenderedChildrenOfTypes(childrenToRender);
         event.getRequestContext().addUIComponentToUpdateByAjax(uiManagement);

         PageNavigation nav = uiNodeSelector.getEdittedNavigation();
         if (nav == null)
         {
            return;
         }
         PageNode[] pageNodes = PageNavigationUtils.searchPageNodesByUri(nav, uri);
View Full Code Here

          UINavigationManagement uiManagement = uiNodeSelector.getParent();
          Class<?>[] childrenToRender = new Class<?>[]{UINavigationNodeSelector.class};
          uiManagement.setRenderedChildrenOfTypes(childrenToRender);
          event.getRequestContext().addUIComponentToUpdateByAjax(uiManagement);

          PageNavigation nav = uiNodeSelector.getEdittedNavigation();
          if (nav == null)
          {
             return;
          }
         
View Full Code Here

     

      UIWizardPageSetInfo uiPageInfo = getChild(UIWizardPageSetInfo.class);
      UIPageNodeSelector uiNodeSelector = uiPageInfo.getChild(UIPageNodeSelector.class);
      PageNode selectedNode = uiNodeSelector.getSelectedPageNode();
      PageNavigation pageNav = uiNodeSelector.getSelectedNavigation();
      if (PortalConfig.USER_TYPE.equals(pageNav.getOwnerType()))
         selectedNode = null;

      Page page = (Page)PortalDataMapper.buildModelObject(uiPage);
      PageNode pageNode = uiPageInfo.getPageNode();
      pageNode.setPageReference(page.getPageId());
      if (selectedNode != null)
      {
         List<PageNode> children = selectedNode.getChildren();
         if (children == null)
         {
            children = new ArrayList<PageNode>();
         }
         children.add(pageNode);
         selectedNode.setChildren((ArrayList<PageNode>)children);
      }
      else
      {
         pageNav.addNode(pageNode);
      }
      uiNodeSelector.selectPageNodeByUri(pageNode.getUri());

      DataStorage dataService = getApplicationComponent(DataStorage.class);
      dataService.create(page);
View Full Code Here

    * @throws Exception
    */
   private boolean isSelectedNodeExist() throws Exception
   {
      UIWizardPageSetInfo uiPageSetInfo = getChild(UIWizardPageSetInfo.class);
      PageNavigation navigation = uiPageSetInfo.getChild(UIPageNodeSelector.class).getSelectedNavigation();
      PageNode pageNode = uiPageSetInfo.getPageNode();
      PageNode selectedPageNode = uiPageSetInfo.getSelectedPageNode();
      List<PageNode> sibbling = null;
      if (selectedPageNode != null)
      {
         sibbling = selectedPageNode.getChildren();
      }
      else
      {
         sibbling = navigation.getNodes();
      }
      if (sibbling != null)
      {
         for (PageNode ele : sibbling)
         {
View Full Code Here

         }

         UIWizardPageSetInfo uiPageSetInfo = uiWizard.getChild(UIWizardPageSetInfo.class);
         UIPageNodeSelector uiNodeSelector = uiPageSetInfo.getChild(UIPageNodeSelector.class);
         uiWizard.updateWizardComponent();
         PageNavigation navigation = uiNodeSelector.getSelectedNavigation();
         if (navigation == null)
         {
            uiPortalApp.addMessage(new ApplicationMessage("UIPageCreationWizard.msg.notSelectedPageNavigation",
               new String[]{}));;
            uiWizard.viewStep(FIRST_STEP);
View Full Code Here

    * @return
    * @throws Exception
    */
   public static PageNavigation filterNavigation(PageNavigation nav, String userName, boolean acceptNonDisplayedNode, boolean acceptNodeWithoutPage) throws Exception
   {
      PageNavigation filter = nav.clone();
      filter.setNodes(new ArrayList<PageNode>());
     
      WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
      ExoContainer container = context.getApplication().getApplicationServiceContainer();
      UserPortalConfigService userService =
         (UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
      UserACL userACL = (UserACL)container.getComponentInstanceOfType(UserACL.class);

      for (PageNode node : nav.getNodes())
      {
         PageNode newNode = filterNodeNavigation(node, userName, acceptNonDisplayedNode, acceptNodeWithoutPage, userService, userACL);
         if (newNode != null)
            filter.addNode(newNode);
      }
      return filter;
   }
View Full Code Here

         UserPortalConfigService service = uiForm.getApplicationComponent(UserPortalConfigService.class);
         service.createUserPortalConfig(PortalConfig.PORTAL_TYPE, portalName, template);
         UserPortalConfig userPortalConfig = service.getUserPortalConfig(portalName, pcontext.getRemoteUser());
         PortalConfig pconfig = userPortalConfig.getPortalConfig();
         uiForm.invokeSetBindingBean(pconfig);
         PageNavigation navigation = dataService.getPageNavigation(PortalConfig.PORTAL_TYPE, portalName);
         dataService.save(pconfig);
         dataService.save(navigation);
         UIPortalApplication uiPortalApp = event.getSource().getAncestorOfType(UIPortalApplication.class);
         UIMaskWorkspace uiMaskWS = uiPortalApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
         uiMaskWS.setUIComponent(null);
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.