Package javax.faces.application

Examples of javax.faces.application.Application


    // if getType returns a type for which we support a default
    // conversion, acquire an appropriate converter instance.
    try
    {
      Application application = context.getApplication();
      return application.createConverter(converterType);
    }
    catch (FacesException e)
    {
      _LOG.warning("Tried to create converter for type {0}, but " +
                   "could not, likely because no converter is registered.",
View Full Code Here


    }
    else
    {
      rw.writeAttribute("style", "padding-right: 5px; float: left;", null);
    }
    Application application = context.getApplication();
    ViewHandler handler = application.getViewHandler();
    String resolvedIconUri = handler.getResourceURL(context, iconUri);
    renderEncodedResourceURI(context, "src", resolvedIconUri);
    rw.endElement("img");
  }
View Full Code Here

  {
    ApplicationFactory factory = (ApplicationFactory)
      FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
    if (factory != null)
    {
      Application application = factory.getApplication();
      if (application != null)
      {
        try
        {
          return application.createValueBinding(expression);
        }
        catch (NullPointerException npe)
        {
          ;
          // In the Sun RI, JSF 1.0 and 1.1, creating a ValueBinding
View Full Code Here

  {
    if (_binding == null)
    {
      ApplicationFactory factory = (ApplicationFactory)
        FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
      Application application = factory.getApplication();
      try
      {
        _binding = application.createValueBinding(_expression);
      }
      catch (ReferenceSyntaxException rse)
      {
        _LOG.warning(rse);
      }
View Full Code Here

  }

  public static ValueBinding getValueBinding(String valueBindingExpression)
  {
    FacesContext context = FacesContext.getCurrentInstance();
    Application app = context.getApplication();
    ValueBinding vb = app.createValueBinding(valueBindingExpression);
    return vb;
  }
View Full Code Here

        Map.Entry entry = (Map.Entry) o;
        LOG.debug("*** '" + entry.getKey() + "' -> '" + entry.getValue() + "'");
      }
    }

    Application application = facesContext.getApplication();
    ViewHandler viewHandler = application.getViewHandler();
    String viewId = facesContext.getViewRoot().getViewId();
    String formAction = viewHandler.getActionURL(facesContext, viewId);
    formAction = facesContext.getExternalContext().encodeActionURL(formAction);
    String charset = (String) page.getAttributes().get(ATTR_CHARSET);
    ResponseUtils.ensureContentTypeHeader(facesContext, charset);
View Full Code Here

    }

    ELContextTag parentELContext = (ELContextTag)
       findAncestorWithClass(this, ELContextTag.class);

    Application application =
      FacesContext.getCurrentInstance().getApplication();

    SetActionListener listener = new SetActionListener();
    if (_from != null)
    {
      if (TagUtils.isValueReference(_from))
      {
        String from = _from;
        if (parentELContext != null)
          from = parentELContext.transformExpression(from);

        listener.setValueBinding(SetActionListener.FROM_KEY,
                                 application.createValueBinding(from));
      }
      else
      {
        listener.setFrom(_from);
      }

      if (TagUtils.isValueReference(_to))
      {
        String to = _to;
        if (parentELContext != null)
          to = parentELContext.transformExpression(to);

        listener.setValueBinding(SetActionListener.TO_KEY,
                                 application.createValueBinding(to));
      }
      else
      {
        throw new JspException("setActionListener's 'to' attribute must " +
                               "be an EL expression.");
View Full Code Here

    }

    ELContextTag parentELContext = (ELContextTag)
       findAncestorWithClass(this, ELContextTag.class);

    Application application =
      FacesContext.getCurrentInstance().getApplication();

    ReturnActionListener listener = new ReturnActionListener();
    if (_value != null)
    {
      String value = _value;
      if (TagUtils.isValueReference(value))
      {
        if (parentELContext != null)
          value = parentELContext.transformExpression(value);

        listener.setValueBinding(ReturnActionListener.VALUE_KEY,
                                 application.createValueBinding(value));
      }
      else
      {
        listener.setValue(value);
      }
View Full Code Here

        Map.Entry entry = (Map.Entry) o;
        LOG.debug("*** '" + entry.getKey() + "' -> '" + entry.getValue() + "'");
      }
    }

    Application application = facesContext.getApplication();
    ViewHandler viewHandler = application.getViewHandler();
    String viewId = facesContext.getViewRoot().getViewId();
    String formAction = viewHandler.getActionURL(facesContext, viewId);
    formAction = facesContext.getExternalContext().encodeActionURL(formAction);
    String contentType = writer.getContentTypeWithCharSet();
    ResponseUtils.ensureContentTypeHeader(facesContext, contentType);
View Full Code Here

            // is delegated because we don't have here the required Resource instance
            return _componentBuilderHandlerDelegate.createComponent(ctx);
        }
        UIComponent c = null;
        FacesContext faces = ctx.getFacesContext();
        Application app = faces.getApplication();
        if (_delegate.getBinding() != null)
        {
            ValueExpression ve = _delegate.getBinding().getValueExpression(ctx, Object.class);
            if (this._rendererType == null)
            {
                c = app.createComponent(ve, faces, this._componentType);
            }
            else
            {
                c = app.createComponent(ve, faces, this._componentType, this._rendererType);
            }
            if (c != null)
            {
                c.setValueExpression("binding", ve);
               
                if (!ve.isReadOnly(faces.getELContext()))
                {
                    ComponentSupport.getViewRoot(ctx, c).getAttributes().put("oam.CALL_PRE_DISPOSE_VIEW", Boolean.TRUE);
                    c.subscribeToEvent(PreDisposeViewEvent.class, new ClearBindingValueExpressionListener());
                }
            }
        }
        else
        {
            if (this._rendererType == null)
            {
                c = app.createComponent(this._componentType);
            }
            else
            {
                c = app.createComponent(faces, this._componentType, this._rendererType);
            }
        }
        return c;
    }
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.