Package javax.faces.application

Examples of javax.faces.application.Application


         {
            request.getParameterMap().put(param.getKey(), new String[] { param.getValue() });
         }
      }
      ExternalContext extContext = new MockExternalContext(request);
      Application application = new MockApplication();
      application.addELResolver(new ImplicitObjectELResolver());
      FacesContext facesCtx = new MockFacesContext(extContext, application).setCurrent();
      assert FacesContext.getCurrentInstance() != null;
      return facesCtx;
   }
View Full Code Here


        if (attributeValue != null)
        {
            if (UIComponentTag.isValueReference(this.client))
            {
                final FacesContext context = FacesContext.getCurrentInstance();
                final Application application = context.getApplication();
                final ValueBinding binding = application.createValueBinding(attributeValue);
                component.setValueBinding(
                    attributeName,
                    binding);
            }
            else
View Full Code Here

      }
      // if getType returns a type for which we support a default
      // conversion, acquire an appropriate converter instance.

      try {
        Application application = context.getApplication();
        converter = application.createConverter(converterType);
        if (log.isDebugEnabled()) {
          log.debug("Created converter " + converter + "of type "
              + converterType + " while decoding component "
              + component.getId());
        }
View Full Code Here

 
  protected Converter createConverter()
  {
    FacesContext context = FacesContext.getCurrentInstance();

    Application app = context.getApplication();

    DateTimeConverter converter = null;

    String id = "javax.faces.DateTime";

    ELContext elContext = context.getELContext();
     
    if (_bindingExpr != null)
      converter = (DateTimeConverter) _bindingExpr.getValue(elContext);

    if (converter == null) {
      converter = (DateTimeConverter) app.createConverter(id);

      if (_bindingExpr != null)
        _bindingExpr.setValue(elContext, converter);
    }
View Full Code Here

 
  protected Validator createValidator()
  {
    FacesContext context = FacesContext.getCurrentInstance();

    Application app = context.getApplication();

    LongRangeValidator validator = null;

    ELContext elContext = context.getELContext();
     
    if (_bindingExpr != null)
      validator = (LongRangeValidator) _bindingExpr.getValue(elContext);

    if (validator == null) {
      String id = LongRangeValidator.VALIDATOR_ID;

      validator = (LongRangeValidator) app.createValidator(id);

      if (_bindingExpr != null)
        _bindingExpr.setValue(elContext, validator);
    }
View Full Code Here

 
  protected Converter createConverter()
  {
    FacesContext context = FacesContext.getCurrentInstance();

    Application app = context.getApplication();

    NumberConverter converter = null;

    String id = "javax.faces.Number";

    ELContext elContext = context.getELContext();
     
    if (_bindingExpr != null)
      converter = (NumberConverter) _bindingExpr.getValue(elContext);

    if (converter == null) {
      converter = (NumberConverter) app.createConverter(id);

      if (_bindingExpr != null)
        _bindingExpr.setValue(elContext, converter);
    }
View Full Code Here

 
  protected Validator createValidator()
  {
    FacesContext context = FacesContext.getCurrentInstance();

    Application app = context.getApplication();

    DoubleRangeValidator validator = null;

    ELContext elContext = context.getELContext();
     
    if (_bindingExpr != null)
      validator = (DoubleRangeValidator) _bindingExpr.getValue(elContext);

    if (validator == null) {
      String id = DoubleRangeValidator.VALIDATOR_ID;

      validator = (DoubleRangeValidator) app.createValidator(id);

      if (_bindingExpr != null)
        _bindingExpr.setValue(elContext, validator);
    }
View Full Code Here

 
  protected Converter createConverter()
  {
    FacesContext context = FacesContext.getCurrentInstance();

    Application app = context.getApplication();

    Converter converter = null;

    ELContext elContext = context.getELContext();
     
    if (_bindingExpr != null)
      converter = (Converter) _bindingExpr.getValue(elContext);

    if (converter == null) {
      String id = (String) _converterIdExpr.getValue(elContext);

      converter = app.createConverter(id);

      if (_bindingExpr != null)
        _bindingExpr.setValue(elContext, converter);
    }
View Full Code Here

 
  protected Validator createValidator()
  {
    FacesContext context = FacesContext.getCurrentInstance();

    Application app = context.getApplication();

    LengthValidator validator = null;

    ELContext elContext = context.getELContext();
     
    if (_bindingExpr != null)
      validator = (LengthValidator) _bindingExpr.getValue(elContext);

    if (validator == null) {
      String id = LengthValidator.VALIDATOR_ID;

      validator = (LengthValidator) app.createValidator(id);

      if (_bindingExpr != null)
        _bindingExpr.setValue(elContext, validator);
    }
View Full Code Here

    ResponseWriter writer = facesContext.getResponseWriter();
    if (writer == null) {
      RenderKit renderKit = facesContext.getRenderKit();
      if (renderKit == null) {
        RenderKitFactory renderFactory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
        Application application = facesContext.getApplication();
        ViewHandler applicationViewHandler = application.getViewHandler();
        String renderKitId = applicationViewHandler.calculateRenderKitId(facesContext);
        renderKit = renderFactory.getRenderKit(facesContext, renderKitId);
      }
      writer = renderKit.createResponseWriter(((HttpServletResponse)
              facesContext.getExternalContext().getResponse()).getWriter(), null, null);
View Full Code Here

TOP

Related Classes of javax.faces.application.Application

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.