Examples of ApplicationFactory


Examples of javax.faces.application.ApplicationFactory

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

Examples of javax.faces.application.ApplicationFactory

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

Examples of javax.faces.application.ApplicationFactory

        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);
View Full Code Here

Examples of javax.faces.application.ApplicationFactory

        this.lifecycle = lifecycleFactory.getLifecycle(getLifecycleId());
    }

    protected void initApplication()
    {
        ApplicationFactory applicationFactory =
                (ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
        this.application = applicationFactory.getApplication();
    }
View Full Code Here

Examples of javax.faces.application.ApplicationFactory

        externalContext = (MockExternalContext)facesContext.getExternalContext();
        UIViewRoot root = new UIViewRoot();
        root.setViewId("/viewId");
        root.setRenderKitId("HTML_BASIC");
        facesContext.setViewRoot(root);
        ApplicationFactory applicationFactory = (ApplicationFactory)FactoryFinder.getFactory("javax.faces.application.ApplicationFactory");
        application = (MockApplication)applicationFactory.getApplication();
        facesContext.setApplication(application);
        RenderKitFactory renderKitFactory = (RenderKitFactory)FactoryFinder.getFactory("javax.faces.render.RenderKitFactory");
        //Wrap renderers with proper exval wrapper
        renderKit = new DefaultRenderKitWrapperFactory().create(new MockRenderKit());
        renderKitFactory.addRenderKit("HTML_BASIC", renderKit);
View Full Code Here

Examples of javax.faces.application.ApplicationFactory

  }

  private void processProperties(FacesContext context, Map<Object, Object> properties) {
      ELContext elContext = context.getELContext();
      // replace all EL-expressions by prepared ValueBinding ?
      ApplicationFactory factory = (ApplicationFactory) FactoryFinder
      .getFactory(FactoryFinder.APPLICATION_FACTORY);
      Application app = factory.getApplication();
     
      for (Entry<Object, Object> entry : properties.entrySet()) {
    Object propertyObject = entry.getValue();
    if (propertyObject instanceof String) {
        String property = (String) propertyObject;
View Full Code Here

Examples of javax.faces.application.ApplicationFactory

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

Examples of javax.faces.application.ApplicationFactory

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

Examples of javax.faces.application.ApplicationFactory

    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

Examples of javax.faces.application.ApplicationFactory

      }
    }

    // Add self as ELContextListener to the Faces App so we can add the
    // portletConfig to any newly created contexts.
    ApplicationFactory appFactory =
      (ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
    Application app = appFactory.getApplication();
    app.addELContextListener(this);

    // Process and cache the FacesServlet mappings for use by
    // ExternalContext
    WebConfigurationProcessor webConfig = new WebConfigurationProcessor(portletContext);
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.