Examples of UIPortlet


Examples of org.exoplatform.portal.webui.application.UIPortlet

   {
      public void execute(Event<UIPage> event) throws Exception
      {
         UIPage uiPage = event.getSource();
         String portletId = event.getRequestContext().getRequestParameter(UIComponent.OBJECTID);
         UIPortlet uiPortlet = uiPage.getChildById(portletId);
         uiPortlet.getProperties().setProperty("appStatus", "SHOW");
         event.getRequestContext().addUIComponentToUpdateByAjax(uiPortlet);
      }
View Full Code Here

Examples of org.exoplatform.portal.webui.application.UIPortlet

      uiWorkingWS.setRenderedChild(UIPortal.class);
      UIPortal uiPortal = uiWorkingWS.findFirstComponentOfType(UIPortal.class);

      UIContainer uiContainer = Util.findUIComponent(uiPortal, UIContainer.class, UIPage.class);
      UIPage uiPage = uiPortal.findFirstComponentOfType(UIPage.class);
      UIPortlet uiPortlet = Util.findUIComponent(uiPortal, UIPortlet.class, UIPage.class);

      String name = "";
      if (uiContainer != null && uiContainer.isShowEditControl())
         name = "'UIContainer'";
      else if (uiPage != null && uiPage.isShowEditControl())
         name = "'UIPage'";
      else if (uiPortlet != null && uiPortlet.isShowEditControl())
         name = "'UIPortlet'";

      getPortalRequestContext().getJavascriptManager().addCustomizedOnLoadScript(
         "eXo.portal.UIPortal.showLayoutModeForPortal(" + name + ");");
   }
View Full Code Here

Examples of org.exoplatform.portal.webui.application.UIPortlet

      uiWorkingWS.setRenderedChild(UIPortalToolPanel.class);
      UIPortalToolPanel uiPortalToolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);

      UIPage uiPage = uiPortalToolPanel.findFirstComponentOfType(UIPage.class);
      UIContainer uiContainer = uiPage.findFirstComponentOfType(UIContainer.class);
      UIPortlet uiPortlet = uiPage.findFirstComponentOfType(UIPortlet.class);

      String name = "";
      if (uiContainer != null && uiContainer.isShowEditControl())
         name = "UIContainer";
      else if (uiPortlet != null && uiPortlet.isShowEditControl())
         name = "UIPortlet";

      getPortalRequestContext().getJavascriptManager().addCustomizedOnLoadScript(
         "eXo.portal.UIPortal.showLayoutModeForPage('" + name + "');");
   }
View Full Code Here

Examples of org.exoplatform.portal.webui.application.UIPortlet

            toUIGadget(uiGadget, ga);
            uiComponent = uiGadget;
         }
         else
         {
            UIPortlet uiPortlet = uiContainer.createUIComponent(context, UIPortlet.class, null, null);
            uiPortlet.setStorageId(application.getStorageId());
            if(application.getStorageName()!=null) {
              uiPortlet.setStorageName(application.getStorageName());
            }
            toUIPortlet(uiPortlet, application);
            uiComponent = uiPortlet;
         }
      }
View Full Code Here

Examples of org.exoplatform.portal.webui.application.UIPortlet

               UIApplicationList appList = uiApp.findFirstComponentOfType(UIApplicationList.class);
               app = appList.getApplication(sourceId);
               ApplicationType applicationType = app.getType();

               //
               UIPortlet uiPortlet = uiTarget.createUIComponent(UIPortlet.class, null, null);
               if (app.getDisplayName() != null)
               {
                  uiPortlet.setTitle(app.getDisplayName());
               }
               else if (app.getApplicationName() != null)
               {
                  uiPortlet.setTitle(app.getApplicationName());
               }
               uiPortlet.setDescription(app.getDescription());
               List<String> accessPersList = app.getAccessPermissions();
               String[] accessPers = accessPersList.toArray(new String[accessPersList.size()]);
               for (String accessPer : accessPers)
               {
                  if (accessPer.equals(""))
                     accessPers = null;
               }
               if (accessPers == null || accessPers.length == 0)
                  accessPers = new String[]{UserACL.EVERYONE};
               uiPortlet.setAccessPermissions(accessPers);
               UIPage uiPage = uiTarget.getAncestorOfType(UIPage.class);

               // Hardcode on state to fix error while drag/drop Dashboard
               if ("dashboard/DashboardPortlet".equals(app.getContentId()))
               {
                  TransientApplicationState state = new TransientApplicationState<Object>(app.getContentId());
                  uiPortlet.setState(new PortletState(state, applicationType));
               }
               else
               {
                  CloneApplicationState state = new CloneApplicationState<Object>(app.getStorageId());
                  uiPortlet.setState(new PortletState(state, applicationType));
               }
               uiPortlet.setPortletInPortal(uiTarget instanceof UIPortal);
               uiPortlet.setShowEditControl(true);
               uiSource = uiPortlet;
            }
            List<UIComponent> children = uiTarget.getChildren();
            uiSource.setParent(uiTarget);
            children.add(position, uiSource);
View Full Code Here

Examples of org.exoplatform.portal.webui.application.UIPortlet

   public void processRender(WebuiRequestContext context) throws Exception
   {
      DataStorage service = getApplicationComponent(DataStorage.class);

      // Get current ui portlet containing this dashboard
      UIPortlet currentUIPortlet = UIPortlet.getCurrentUIPortlet();

      // Get dashboard for merging
      Container dashboard = null;
      if (currentUIPortlet.getStorageId() != null)
      {
         dashboard = service.loadDashboard(currentUIPortlet.getStorageId());
      }

      //
      if (dashboard != null)
      {
View Full Code Here

Examples of org.exoplatform.portal.webui.application.UIPortlet

      {
         return;
      }

      // Get current ui portlet containing this dashboard
      UIPortlet currentUIPortlet = UIPortlet.getCurrentUIPortlet();

      // We save only if we have an existing storage id
      // we would not have a storage id in the case where
      // the dashboard portlet is initially dropped in the
      // page
      if (currentUIPortlet.getStorageId() != null)
      {
         // Build dashboard
         Dashboard dashboard = new Dashboard(currentUIPortlet.getStorageId());

         // Assemble the dashboard
         PortalDataMapper.toContainer(dashboard, uiRoot);

         // Get data storage
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.