Package org.exoplatform.portal.webui.workspace

Examples of org.exoplatform.portal.webui.workspace.UIPortalApplication.findFirstComponentOfType()


   {
      public void execute(Event<UIPortal> event) throws Exception
      {
         UIPortal uiPortal = event.getSource();
         UIPortalApplication application = uiPortal.getAncestorOfType(UIPortalApplication.class);
         UIPortalComposer composer = application.findFirstComponentOfType(UIPortalComposer.class);
         UITabPane uiTabPane = composer.getChild(UITabPane.class);
         String appListId = uiTabPane.getChild(UIApplicationList.class).getId();
         uiTabPane.replaceChild(appListId, composer.createUIComponent(UIApplicationList.class, null, null));
      }
   }
View Full Code Here


            UserPortalConfigService service = uiApp.getApplicationComponent(UserPortalConfigService.class);
            PortalRequestContext context = Util.getPortalRequestContext();
            if (portalName != null
                    && service.getUserPortalConfig(portalName, event.getRequestContext().getRemoteUser()) == null) {
                uiApp.addMessage(new ApplicationMessage("UISiteManagement.msg.portal-not-exist", new String[] { portalName }));
                context.addUIComponentToUpdateByAjax(uiApp.findFirstComponentOfType(UIWorkingWorkspace.class));
                context.setFullRender(true);
                return;
            }

            UIMaskWorkspace uiMaskWS = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
View Full Code Here

    public static void showComponentLayoutMode(Class clazz) {
        if (clazz == null)
            return;
        UIPortalApplication portalApp = getUIPortalApplication();
        UIEditInlineWorkspace uiEditWS = portalApp.findFirstComponentOfType(UIEditInlineWorkspace.class);
        UIContainer uiParent = null;

        UIComponent uiComponent = uiEditWS.getUIComponent();
        if (uiComponent instanceof UIPortal) {
            UIPortal uiPortal = (UIPortal) uiComponent;
View Full Code Here

    public static void showComponentEditInViewMode(Class clazz) {
        if (clazz == null)
            return;
        UIPortalApplication portalApp = getUIPortalApplication();
        UIEditInlineWorkspace uiEditWS = portalApp.findFirstComponentOfType(UIEditInlineWorkspace.class);

        UIComponent uiComponent = uiEditWS.getUIComponent();
        if (uiComponent instanceof UIPortal) {
            UIPortal uiPortal = (UIPortal) uiComponent;
            uiPortal.setMaximizedUIComponent(null);
View Full Code Here

     * @throws Exception if there is anything wrong in saving process
     */
    private void save() throws Exception {
        PortalRequestContext prContext = Util.getPortalRequestContext();
        UIPortalApplication uiPortalApp = (UIPortalApplication) prContext.getUIApplication();
        UIWorkingWorkspace uiWorkingWS = uiPortalApp.findFirstComponentOfType(UIWorkingWorkspace.class);
        UIEditInlineWorkspace uiEditWS = uiWorkingWS.getChild(UIEditInlineWorkspace.class);
        UIPortal editPortal = (UIPortal) uiEditWS.getUIComponent();
        UIPortal uiPortal = Util.getUIPortal();
        String remoteUser = prContext.getRemoteUser();
        String portalName = prContext.getPortalOwner();
View Full Code Here

     * @throws Exception
     */
    public void updateWorkspaceComponent() throws Exception {
        UIPortalApplication uiApp = Util.getUIPortalApplication();
        WebuiRequestContext rcontext = WebuiRequestContext.getCurrentInstance();
        UIEditInlineWorkspace uiEditWS = uiApp.findFirstComponentOfType(UIEditInlineWorkspace.class);
        List<UIComponent> children = uiEditWS.getChildren();
        for (UIComponent child : children) {
            if (!child.isRendered() || child.getClass().equals(UIPortalComposer.class)) {
                continue;
            }
View Full Code Here

    }

    public static class ChangeApplicationListActionListener extends EventListener<UIPortal> {
        public void execute(Event<UIPortal> event) throws Exception {
            UIPortalApplication application = Util.getUIPortalApplication();
            UIPortalComposer composer = application.findFirstComponentOfType(UIPortalComposer.class);
            UITabPane uiTabPane = composer.getChild(UITabPane.class);
            String appListId = uiTabPane.getChild(UIApplicationList.class).getId();
            uiTabPane.replaceChild(appListId, composer.createUIComponent(UIApplicationList.class, null, null));
        }
    }
View Full Code Here

            UserPortalConfigService service = uiApp.getApplicationComponent(UserPortalConfigService.class);
            PortalRequestContext context = Util.getPortalRequestContext();
            if (portalName != null
                    && service.getUserPortalConfig(portalName, event.getRequestContext().getRemoteUser()) == null) {
                uiApp.addMessage(new ApplicationMessage("UISiteManagement.msg.portal-not-exist", new String[] { portalName }));
                context.addUIComponentToUpdateByAjax(uiApp.findFirstComponentOfType(UIWorkingWorkspace.class));
                context.setFullRender(true);
                return;
            }

            UIMaskWorkspace uiMaskWS = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
View Full Code Here

                    // TODO: Raise Portlet Event instead
                    uiWorkingWS.updatePortletsByName("PortalNavigationPortlet");
                    uiWorkingWS.updatePortletsByName("UserToolbarSitePortlet");
                } else {
                    UIWorkingWorkspace uiWorkingWS = uiPortalApp.findFirstComponentOfType(UIWorkingWorkspace.class);
                    UIEditInlineWorkspace uiEditWS = uiWorkingWS.getChild(UIEditInlineWorkspace.class);
                    UIPortal editPortal = (UIPortal) uiEditWS.getUIComponent();
                    uiForm.invokeSetBindingBean(editPortal);
                }
            } else {
View Full Code Here

                uiApp.addMessage(new ApplicationMessage("UIPortalApplication.msg.deletePageBody", new Object[] {},
                        ApplicationMessage.WARNING));
                return;
            }

            UIPortalComposer portalComposer = uiApp.findFirstComponentOfType(UIPortalComposer.class);
            portalComposer.setEditted(true);

            UIPage uiPage = uiComponentTobeRemoved.getAncestorOfType(UIPage.class);
            if (uiPage != null && uiPage.getMaximizedUIPortlet() != null) {
                if (id.equals(uiPage.getMaximizedUIPortlet().getId())) {
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.