Package org.exoplatform.portal.config.model

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


   {
      PageNavigation portalSelectedNav = Util.getUIPortal().getSelectedNavigation();
      if (portalSelectedNav != null)
      {
         selectNavigation(portalSelectedNav);
         PageNode portalSelectedNode = Util.getUIPortal().getSelectedNode();
         if (portalSelectedNode != null)
         {
            selectPageNodeByUri(portalSelectedNode.getUri());
         }
         return;
      }
      selectNavigation();
   }
View Full Code Here


      }
      List<PageNode> pageNodes = pageNav.getNodes();
      UITree uiTree = getChild(UITree.class);
      for (PageNode ele : pageNodes)
      {
         PageNode returnPageNode = searchPageNodeByUri(ele, uri, uiTree);
         if (returnPageNode == null)
         {
            continue;
         }
         if (uiTree.getSibbling() == null)
View Full Code Here

      {
         return null;
      }
      for (PageNode ele : children)
      {
         PageNode returnPageNode = searchPageNodeByUri(ele, uri, tree);
         if (returnPageNode == null)
         {
            continue;
         }
         if (tree.getSibbling() == null)
View Full Code Here

      }
      List<PageNode> pageNodes = pageNav.getNodes();
      UITree uiTree = getChild(UITree.class);
      for (PageNode ele : pageNodes)
      {
         PageNode returnPageNode = searchPageNodeByUri(ele, uri, uiTree);
         if (returnPageNode == null)
         {
            continue;
         }
         if (uiTree.getSibbling() == null)
View Full Code Here

      {
         return null;
      }
      for (PageNode ele : children)
      {
         PageNode returnPageNode = searchPageNodeByUri(ele, uri, tree);
         if (returnPageNode == null)
         {
            continue;
         }
         if (tree.getSibbling() == null)
View Full Code Here

         UIRightClickPopupMenu uiPopupMenu = event.getSource();

         UINavigationNodeSelector uiNodeSelector = uiPopupMenu.getAncestorOfType(UINavigationNodeSelector.class);

         // get Selected PageNode
         PageNode selectedPageNode = null;
         List<PageNode> pageNodes = uiNodeSelector.getEdittedNavigation().getNodes();
         if (uri != null && uri.trim().length() > 0)
         {
            for (PageNode pageNode : pageNodes)
            {
               selectedPageNode = PageNavigationUtils.searchPageNodeByUri(pageNode, uri);
               if (selectedPageNode != null)
               {
                  break;
               }
            }
         }

         UIPortalApplication uiApp = Util.getUIPortalApplication();

         if (selectedPageNode.getPageReference() == null)
         {
            uiApp.addMessage(new ApplicationMessage("UIPageNodeSelector.msg.notAvailable", null));
            return;
         }

         UIWorkingWorkspace uiWorkingWS = uiApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
         UIPortalToolPanel uiToolPanel =
            uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class).setRendered(true);
         UserPortalConfigService userService = uiToolPanel.getApplicationComponent(UserPortalConfigService.class);

         // get selected page
         String pageId = selectedPageNode.getPageReference();
         Page selectPage = (pageId != null) ? userService.getPage(pageId) : null;
         if (selectPage != null)
         {
            UserACL userACL = uiApp.getApplicationComponent(UserACL.class);
            if (!userACL.hasEditPermission(selectPage))
            {
               uiApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.UserNotPermission", new String[]{pageId}, 1));
               return;
            }

            uiApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
            //uiWorkingWS.setRenderedChild(UIPortalToolPanel.class);
            //uiWorkingWS.addChild(UIPortalComposer.class, "UIPageEditor", null);

            uiWorkingWS.setRenderedChild(UIEditInlineWorkspace.class);

            UIPortalComposer portalComposer =
               uiWorkingWS.findFirstComponentOfType(UIPortalComposer.class).setRendered(true);
            portalComposer.setShowControl(true);
            portalComposer.setEditted(false);
            portalComposer.setCollapse(false);
            portalComposer.setId("UIPageEditor");
            portalComposer.setComponentConfig(UIPortalComposer.class, "UIPageEditor");

            uiToolPanel.setShowMaskLayer(false);
            uiToolPanel.setWorkingComponent(UIPage.class, null);
            UIPage uiPage = (UIPage)uiToolPanel.getUIComponent();

            WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
            if(selectPage.getTitle() == null)
               selectPage.setTitle(selectedPageNode.getLabel());

            // convert Page to UIPage
            PortalDataMapper.toUIPage(uiPage, selectPage);
            Util.getPortalRequestContext().addUIComponentToUpdateByAjax(uiWorkingWS);
            Util.getPortalRequestContext().setFullRender(true);
View Full Code Here

         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);
         Page node = (pageId != null) ? service.getPage(pageId) : null;
         if (node != null)
         {
View Full Code Here

         UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
         pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
         pcontext.setFullRender(true);

         UIContainer uiParent = uiPageNodeSelector.getParent();
         PageNode node = null;
         if (uiPageNodeSelector.getSelectedNode() == null)
         {
            node = Util.getUIPortal().getSelectedNode();
         }
         else
         {
            node = uiPageNodeSelector.getSelectedNode().getNode();
         }
         if (node == null)
         {
            uiPageNodeSelector.selectNavigation(uiPageNodeSelector.getSelectedNavigation());
            uiToolPanel.setUIComponent(null);
            return;
         }

         UserPortalConfigService configService = uiParent.getApplicationComponent(UserPortalConfigService.class);
         Page page = null;
         if (node.getPageReference() != null)
         {
            page = configService.getPage(node.getPageReference(), event.getRequestContext().getRemoteUser());
         }

         if (page == null)
         {
            uiToolPanel.setUIComponent(null);
View Full Code Here

      UIPage uiPage = (UIPage)uiPagePreview.getUIComponent();
     

      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);
      dataService.save(pageNav);
      UIPortal uiPortal = Util.getUIPortal();
View Full Code Here

    */
   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();
      }
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.