Examples of UIPortlet


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

        if (!((UIDashboard) getParent()).canEdit()) {
            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

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);
                    // Only setting title for Gadgets as it's using Portlet wrapper for displaying
                    if (app.getType().equals(ApplicationType.GADGET)) {
                        uiPortlet.setTitle(app.getDisplayName());
                    }
                    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 {
                        ApplicationState state;
                        // if we have a new portlet added to the page we need for it to have its own state.
                        // otherwise all new portlets added to a page will have the same state.
                        if (newComponent) {
                            state = new TransientApplicationState<Object>(app.getContentId());

                            // if the portlet is not new, then we should clone it from the original portlet
                        } else {
                            state = new CloneApplicationState<Object>(app.getStorageId());
                        }
                        uiPortlet.setState(new PortletState(state, applicationType));
                    }
                    uiPortlet.setPortletInPortal(uiTarget instanceof UIPortal);

                    // TODO Wait to fix issue EXOGTN-213 and then
                    // we should get "showInfobar" from current UI portal instead of Storage service
                    UIPortal currentPortal = Util.getUIPortal();
                    DataStorage storage = uiApp.getApplicationComponent(DataStorage.class);
                    uiPortlet.setShowInfoBar(storage.getPortalConfig(currentPortal.getSiteKey().getTypeName(),
                            currentPortal.getSiteKey().getName()).isShowInfobar());
                    uiSource = uiPortlet;
                }
                List<UIComponent> children = uiTarget.getChildren();
                uiSource.setParent(uiTarget);
View Full Code Here

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

        if (uiPageBody == null) {
            return;
        }

        if (uiPageBody.getMaximizedUIComponent() != null) {
            UIPortlet currentPortlet = (UIPortlet) uiPageBody.getMaximizedUIComponent();
            currentPortlet.setCurrentWindowState(WindowState.NORMAL);
            uiPageBody.setMaximizedUIComponent(null);
        }
        uiPageBody.setPageBody(getSelectedUserNode(), this);
    }
View Full Code Here

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

    @Override
    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) {
            UIContainer uiRoot = getChild(UIContainer.class);
View Full Code Here

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

        if (!((UIDashboard) getParent()).canEdit()) {
            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

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

                UIGadget uiGadget = uiContainer.createUIComponent(context, UIGadget.class, null, null);
                uiGadget.setStorageId(application.getStorageId());
                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;
            }
        } else if (model instanceof Container) {
View Full Code Here

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

         return;
      }
     
      if (uiPageBody.getMaximizedUIComponent() != null)
      {
         UIPortlet currentPortlet = (UIPortlet)uiPageBody.getMaximizedUIComponent();
         currentPortlet.setCurrentWindowState(WindowState.NORMAL);
         uiPageBody.setMaximizedUIComponent(null);
      }
      uiPageBody.setPageBody(selectedNode_, this);
     
      //Refresh locale
View Full Code Here

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

   {
      public void execute(Event<UIPortal> event) throws Exception
      {
         UIPortal uiPortal = event.getSource();
         String portletId = event.getRequestContext().getRequestParameter("portletId");
         UIPortlet uiPortlet = uiPortal.findComponentById(portletId);
         WebuiRequestContext context = event.getRequestContext();
         uiPortlet.createEvent("ChangeWindowState", event.getExecutionPhase(), context).broadcast();
      }
View Full Code Here

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

   {
      public void execute(Event<UIPortal> event) throws Exception
      {
         UIPortal uiPortal = event.getSource();
         String portletId = event.getRequestContext().getRequestParameter("portletId");
         UIPortlet uiPortlet = uiPortal.findComponentById(portletId);
         WebuiRequestContext context = event.getRequestContext();
         uiPortlet.createEvent("ChangeWindowState", event.getExecutionPhase(), context).broadcast();
      }
View Full Code Here

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

         UIPageBody uiPageBody = uiPortal.findFirstComponentOfType(UIPageBody.class);
         if (uiPageBody != null)
         {
            if (uiPageBody.getMaximizedUIComponent() != null)
            {
               UIPortlet currentPortlet = (UIPortlet)uiPageBody.getMaximizedUIComponent();
               currentPortlet.setCurrentWindowState(WindowState.NORMAL);
               uiPageBody.setMaximizedUIComponent(null);
            }
         }
         PageNodeEvent<UIPortal> pnevent = new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE, uri);
         uiPortal.broadcast(pnevent, Event.Phase.PROCESS);
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.