Package org.exoplatform.webui.application

Examples of org.exoplatform.webui.application.WebuiApplication


        if (context.useAjax() && !prcontext.getFullRender()) {
            if (markup != null) {
                markup.writeTo(prcontext.getWriter());
            }
        } else {
            WebuiApplication app = (WebuiApplication) prcontext.getApplication();
            ApplicationResourceResolver resolver = app.getResourceResolver();
            WebuiBindingContext bcontext = new WebuiBindingContext(resolver, context.getWriter(), uicomponent, prcontext);
            bcontext.put(UIComponent.UICOMPONENT, uicomponent);
            bcontext.put("portletContent", markup);
            try {
                renderTemplate(uicomponent.getTemplate(), bcontext);
View Full Code Here


            markup.writeTo(prcontext.getWriter());
         }
      }
      else
      {
         WebuiApplication app = (WebuiApplication)prcontext.getApplication();
         ApplicationResourceResolver resolver = app.getResourceResolver();
         WebuiBindingContext bcontext = new WebuiBindingContext(resolver, context.getWriter(), uicomponent, prcontext);
         bcontext.put(UIComponent.UICOMPONENT, uicomponent);
         bcontext.put("portletContent", markup);
         bcontext.put("portletTitle", portletTitle);
         try
View Full Code Here

   public UIApplication restoreUIRootComponent(WebuiRequestContext context) throws Exception
   {
      context.setStateManager(this);

      //
      WebuiApplication app = (WebuiApplication)context.getApplication();

      //
      ApplicationState appState = null;
      HttpSession session = getSession(context);
      String key = getKey(context);
      if (session != null)
      {
         appState = (ApplicationState)session.getAttribute(APPLICATION_ATTRIBUTE_PREFIX + key);
      }

      //

      //
      UIApplication uiapp = null;
      if (appState != null)
      {
         if (Safe.equals(context.getRemoteUser(), appState.getUserName()))
         {
            uiapp = appState.getApplication();
         }
      }

      //
      if (appState != null)
      {
         log.debug("Found application " + key + " :" + appState.getApplication());
      }
      else
      {
         log.debug("Application " + key + " not found");
      }

      // Looks like some necessary hacking
      if (context instanceof PortalRequestContext)
      {
         PortalRequestContext portalRC = (PortalRequestContext)context;
         UserPortalConfig config = getUserPortalConfig(portalRC);
         if (config == null)
         {
            HttpServletResponse response = portalRC.getResponse();
            response.sendRedirect(portalRC.getRequest().getContextPath() + "/portal-unavailable.jsp");
            portalRC.setResponseComplete(true);
            return null;
         }
         portalRC.setAttribute(UserPortalConfig.class, config);
      }

      //
      if (uiapp == null)
      {
         ConfigurationManager cmanager = app.getConfigurationManager();
         String uirootClass = cmanager.getApplication().getUIRootComponent();
         Class<? extends UIApplication> type = (Class<UIApplication>) Thread.currentThread().getContextClassLoader().loadClass(uirootClass);
         uiapp = app.createUIComponent(type, null, null, context);
      }

      //
      return uiapp;
   }
View Full Code Here

        if (context.useAjax() && !prcontext.getFullRender()) {
            if (markup != null) {
                markup.writeTo(prcontext.getWriter());
            }
        } else {
            WebuiApplication app = (WebuiApplication) prcontext.getApplication();
            ApplicationResourceResolver resolver = app.getResourceResolver();
            WebuiBindingContext bcontext = new WebuiBindingContext(resolver, context.getWriter(), uicomponent, prcontext);
            bcontext.put(UIComponent.UICOMPONENT, uicomponent);
            bcontext.put("portletContent", markup);
            try {
                renderTemplate(uicomponent.getTemplate(), bcontext);
View Full Code Here

   }

   public void setComponentConfig(Class<?> clazz, String id)
   {
      WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
      WebuiApplication app = (WebuiApplication)context.getApplication();
      this.config = app.getConfigurationManager().getComponentConfig(clazz, id);
   }
View Full Code Here

   }

   public <T extends UIComponent> T createUIComponent(WebuiRequestContext context, Class<T> type, String configId,
                                                      String componentId) throws Exception
   {
      WebuiApplication app = (WebuiApplication)context.getApplication();
      T comp = app.createUIComponent(type, configId, componentId, context);
      return comp;
   }
View Full Code Here

   public <T extends UIComponent> T replaceChild(String targetChildId, Class<T> type, String configId, String id)
      throws Exception
   {
      WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
      WebuiApplication app = (WebuiApplication)context.getApplication();
      UIComponent comp = app.createUIComponent(type, configId, id, context);
      comp = replaceChild(targetChildId, comp);
      return type.cast(comp);
   }
View Full Code Here

   }

   public <T extends UIComponent> T addChild(Class<T> type, String configId, String id) throws Exception
   {
      WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
      WebuiApplication app = (WebuiApplication)context.getApplication();
      T comp = app.createUIComponent(type, configId, id, context);
      addChild(comp);
      return comp;
   }
View Full Code Here

   @Override
   public Component read(ComponentHandle internal) throws Exception
   {
      WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
      WebuiApplication webuiApp = (WebuiApplication)context.getApplication();
      ConfigurationManager configMgr = webuiApp.getConfigurationManager();
      return configMgr.getComponentConfig(internal);
   }
View Full Code Here

        setId(componentId);
    }

    public void setComponentConfig(Class<?> clazz, String id) {
        WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
        WebuiApplication app = (WebuiApplication) context.getApplication();
        this.config = app.getConfigurationManager().getComponentConfig(clazz, id);
    }
View Full Code Here

TOP

Related Classes of org.exoplatform.webui.application.WebuiApplication

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.