Package org.exoplatform.portal.webui.portal

Examples of org.exoplatform.portal.webui.portal.UIPortal


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

            dataService.save(pageNavigation);

            //Update UserToolbarGroupPortlet
View Full Code Here


    */
   static public void setupPublicRenderParams(UIPortlet uiPortlet, Map<String, String[]> requestParams)
   {
      if (ParameterValidation.existsAndIsNotEmpty(requestParams))
      {
         UIPortal uiPortal = Util.getUIPortal();
         Map<String, String[]> publicParams = uiPortal.getPublicParameters();

         for (String key : requestParams.keySet())
         {
            String[] value = requestParams.get(key);
            if (uiPortlet.supportsPublicParam(key))
View Full Code Here

      return node.getUri().equals(pageNode.getUri());
   }

   public void processRender(WebuiRequestContext context) throws Exception
   {
      UIPortal uiPortal = Util.getUIPortal();
      if ((uiPortal.getSelectedNode() != null) && (uiPortal.getSelectedNode() != selectedNode_))
      {
         setSelectedPageNode(uiPortal.getSelectedNode());
      }
      super.processRender(context);
   }
View Full Code Here

   static public class SelectNodeActionListener extends EventListener<UIPortalNavigation>
   {
      public void execute(Event<UIPortalNavigation> event) throws Exception
      {
         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
         {
            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);
         if (parentUri == null || parentUri.length() < 1)
            uiNavigation.selectedParent_ = selectNav;
         else
            uiNavigation.selectedParent_ = PageNavigationUtils.searchPageNodeByUri(selectNav, parentUri);

         PageNodeEvent<UIPortal> pnevent;
         pnevent = new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE, uri);
         uiPortal.broadcast(pnevent, Event.Phase.PROCESS);
      }
View Full Code Here

      public void execute(Event<UIPortalNavigation> event) throws Exception
      {
         UIPortalNavigation uiNavigation = event.getSource();

         TreeNode treeNode = uiNavigation.getTreeNodes();
         UIPortal uiPortal = Util.getUIPortal();

         // get URI
         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);
        
         //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;
View Full Code Here

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

   protected void updateUIPortal(Event<? extends UIPageWizard> event) throws Exception
   {
      PortalRequestContext pcontext = (PortalRequestContext)event.getRequestContext();

      UIPortal uiPortal = Util.getUIPortal();
      uiPortal.setRenderSibling(UIPortal.class);
      pcontext.setFullRender(true);
   }
View Full Code Here

      {
         UIPortalApplication uiPortalApp = event.getSource().getAncestorOfType(UIPortalApplication.class);
         uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
         PortalRequestContext pcontext = (PortalRequestContext)event.getRequestContext();

         UIPortal uiPortal = Util.getUIPortal();
         uiPortal.setRenderSibling(UIPortal.class);
         pcontext.setFullRender(true);

         UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
         uiWorkingWS.findFirstComponentOfType(UIPortalComposer.class).setRendered(false);
         uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
View Full Code Here

    */
   static public class EditPortletActionListener extends EventListener<UIPortlet>
   {
      public void execute(Event<UIPortlet> event) throws Exception
      {
         UIPortal uiPortal = Util.getUIPortal();
         UIPortalApplication uiApp = uiPortal.getAncestorOfType(UIPortalApplication.class);
         UIMaskWorkspace uiMaskWS = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
         uiMaskWS.setUpdated(true);
         UIPortlet uiPortlet = event.getSource();
         UIPortletForm uiPortletForm = uiMaskWS.createUIComponent(UIPortletForm.class, null, null);
         uiPortletForm.setValues(uiPortlet);
View Full Code Here

      uiNodeSelector.selectPageNodeByUri(pageNode.getUri());

      DataStorage dataService = getApplicationComponent(DataStorage.class);
      dataService.create(page);
      dataService.save(pageNav);
      UIPortal uiPortal = Util.getUIPortal();
      setNavigation(uiPortal.getNavigations(), uiNodeSelector.getSelectedNavigation());
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.webui.portal.UIPortal

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.