Package javax.faces.application

Examples of javax.faces.application.ApplicationFactory


    if (context != null)
      return context.getApplication().getPropertyResolver();
   
    // If that fails, then we're likely outside of the JSF lifecycle.
    // Look to the ApplicationFactory.
    ApplicationFactory factory = (ApplicationFactory)
      FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
    return factory.getApplication().getPropertyResolver();
   
  }
View Full Code Here


        externalContext = (MockExternalContext) facesContext.getExternalContext();
        UIViewRoot root = new UIViewRoot();
        root.setViewId("/viewId");
        root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT);
        facesContext.setViewRoot(root);
        ApplicationFactory applicationFactory = (ApplicationFactory)
        FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
        application = new MockApplication();
        applicationFactory.setApplication(application);
        facesContext.setApplication(application);
        RenderKitFactory renderKitFactory = (RenderKitFactory)
        FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
        renderKit = new MockRenderKit();
        renderKitFactory.addRenderKit(RenderKitFactory.HTML_BASIC_RENDER_KIT, renderKit);
View Full Code Here

        super.init();

        /* Get the application factory, and swap the Application that is in it
         * with the one Spring enhanced Application.
         */
        ApplicationFactory appFactory =
            (ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);

        Application application = appFactory.getApplication();

        /* Nest the original in the enhanced version.*/
        SpringApplication springApplication = new SpringApplication(application);

        /* Stuff the enhanced version back into the factory. */
        appFactory.setApplication(springApplication);
    }
View Full Code Here

        Method renderKitPurgeMethod;
        Method lifecyclePurgeMethod;

        // Check that we have access to all of the necessary purge methods before purging anything
        //
        ApplicationFactory applicationFactory = (ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
        appFactoryPurgeMethod = applicationFactory.getClass().getMethod("purgeApplication", NO_PARAMETER_TYPES);

        RenderKitFactory renderKitFactory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
        renderKitPurgeMethod = renderKitFactory.getClass().getMethod("purgeRenderKit", NO_PARAMETER_TYPES);
       
        LifecycleFactory lifecycleFactory = (LifecycleFactory) FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
View Full Code Here

        if(context != null)
        {
            return context.getApplication();
        } else
        {
            ApplicationFactory afactory = (ApplicationFactory)FactoryFinder.getFactory("javax.faces.application.ApplicationFactory");
            return afactory.getApplication();
        }
    }
View Full Code Here

        }

        // Construct and cache a new array, before returning it
        SelectItem item = null;
        List list = new ArrayList();
        ApplicationFactory afactory = (ApplicationFactory)
          FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
        Application application = afactory.getApplication();
        Iterator supporteds = application.getSupportedLocales();
        while (supporteds.hasNext()) {
            Locale supported = (Locale) supporteds.next();
            item = new SelectItem(supported.toString(),
                                  messages.getMessage("locale." + supported.toString(),
View Full Code Here

    protected ExpressionFactory getExpressionFactory()
    {
        if (expressionFactory == null)
        {
            ApplicationFactory appFactory = (ApplicationFactory) FactoryFinder
                    .getFactory(FactoryFinder.APPLICATION_FACTORY);
            expressionFactory = appFactory.getApplication().getExpressionFactory();
        }
        return expressionFactory;
    }
View Full Code Here

        if(context != null)
        {
            return FacesContext.getCurrentInstance().getApplication();
        }
       
        ApplicationFactory afactory = (ApplicationFactory)FactoryFinder.getFactory("javax.faces.application.ApplicationFactory");
        return afactory.getApplication();
       
    }
View Full Code Here

    protected void nonFacesRequest(RenderRequest request, RenderResponse response, String view)
            throws PortletException
    {
        if (log.isTraceEnabled()) log.trace("Non-faces request: contextPath = " + request.getContextPath());
        setContentType(request, response); // do this in case nonFacesRequest is called by a subclass
        ApplicationFactory appFactory =
            (ApplicationFactory)FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
        Application application = appFactory.getApplication();
        ViewHandler viewHandler = application.getViewHandler();
        FacesContext facesContext = facesContext(request, response);
        UIViewRoot viewRoot = viewHandler.createView(facesContext, view);
        viewRoot.setViewId(view);
        facesContext.setViewRoot(viewRoot);
View Full Code Here

        {
            return context.getApplication();
        }
        else
        {
            ApplicationFactory afactory = (ApplicationFactory)FactoryFinder.getFactory(
                    "javax.faces.application.ApplicationFactory");
            return afactory.getApplication();
        }
    }
View Full Code Here

TOP

Related Classes of javax.faces.application.ApplicationFactory

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.