Package javax.faces.render

Examples of javax.faces.render.Renderer


   
    InternalState iState = _getInternalState(true);
    if (iState._clientKeyMgr == null)
    {
      FacesContext fc = FacesContext.getCurrentInstance();
      Renderer r = getRenderer(fc);
      iState._clientKeyMgr = (r instanceof ClientRowKeyManagerFactory)
        ? ((ClientRowKeyManagerFactory) r).createClientRowKeyManager(fc, this)
        : new DefaultClientKeyManager();
    }
    return iState._clientKeyMgr;
View Full Code Here


   *  is <code>null</code>
   */
  @Override
  public Renderer getRenderer(String family, String rendererType)
  {
    Renderer renderer = findRenderer(family, rendererType);
    if (renderer == null)
    {
      if (_LOG.isWarning())
        _LOG.warning("Renderer ''{0}'' not found for component family ''{1}''",
                     new String[]{rendererType, family});
View Full Code Here

   * getRenderer() will log a warning when one cannot be found.
   */
  public Renderer findRenderer(String family, String rendererType)
  {
    Object o = _get(family, rendererType);
    Renderer renderer = null;

    if (o == null)
    {
      if (_aggregated != null)
      {
View Full Code Here

  public void encodeEnd(FacesContext context,
                     UIComponent component) throws IOException
  {
    // The tr:commandLink is not a rendersChildren component,
    // but h:commandLink is.  Hence, the difference in behavior
    Renderer renderer = createRenderer(component);
    renderer.encodeBegin(context, component);

    for(UIComponent child : (List<UIComponent>)component.getChildren())
    {
      RenderUtils.encodeRecursive(context, child);
    }

    renderer.encodeEnd(context, component);
  }
View Full Code Here

   */
  protected Object getConvertedValue(
    FacesContext context,
    Object       submittedValue) throws ConverterException
  {
    Renderer renderer = getRenderer(context);
    Object newValue = null;

    if (_LOG.isFine())
    {
      _LOG.fine("Converting from " + submittedValue + "(" +
                submittedValue.getClass() + ")");
    }

    if (renderer != null)
    {
      newValue = renderer.getConvertedValue(context, this,
                                            submittedValue);

      if (_LOG.isFine())
      {
        _LOG.fine("Renderer " + renderer + " returned value " + newValue + "(" +
View Full Code Here

      return;

    // if this is the table there will be a rendererType:
    if (getRendererType() != null)
    {
      Renderer renderer = getRenderer(context);
      if (renderer != null)
      {
        renderer.encodeChildren(context, this);
      }
    }
    else // this is not the table. it must be the iterator
    {
      Runner runner = new Runner()
View Full Code Here

        if (rendererType == null)
        {
            throw new NullPointerException("renderer type must not be null.");
        }
        Map <String,Renderer> familyRendererMap = _renderers.get(componentFamily);
        Renderer renderer = null;
        if (familyRendererMap != null)
        {
            renderer = familyRendererMap.get(rendererType);
        }
        if (renderer == null)
View Full Code Here

        /*
         * The Renderer instance to inspect must be obtained by calling FacesContext.getRenderKit() and calling
         * RenderKit.getRenderer(java.lang.String, java.lang.String) on the result, passing the argument componentFamily
         * of the newly created component as the first argument and the argument rendererType as the second argument.
         */
        Renderer renderer = context.getRenderKit().getRenderer(component.getFamily(), rendererType);
        if (renderer == null)
        {
            // If no such Renderer can be found, a message must be logged with a helpful error message.
            log.severe("renderer cannot be found for component type " + componentType + " and renderer type "
                    + rendererType);
View Full Code Here

     * converter to the submittedValue and return the result.
     * </ul>
     */
    protected Object getConvertedValue(FacesContext context, Object submittedValue) throws ConverterException
    {
        Renderer renderer = getRenderer(context);
        if (renderer != null)
        {
            return renderer.getConvertedValue(context, this, submittedValue);
        }
        else if (submittedValue instanceof String)
        {
            Converter converter = _SharedRendererUtils.findUIOutputConverter(context, this);
            if (converter != null)
View Full Code Here

                int step = getStep();
                end = (end >= 0) ? i + end : Integer.MAX_VALUE - 1;
               
                // grab renderer
                String rendererType = getRendererType();
                Renderer renderer = null;
                if (rendererType != null)
                {
                    renderer = getRenderer(faces);
                }
               
                _count = 0;
               
                _setIndex(i);
                while (i <= end && _isIndexAvailable())
                {

                    if (PhaseId.RENDER_RESPONSE.equals(phase) && renderer != null)
                    {
                        renderer.encodeChildren(faces, this);
                    }
                    else
                    {
                        for (int j = 0, childCount = getChildCount(); j < childCount; j++)
                        {
View Full Code Here

TOP

Related Classes of javax.faces.render.Renderer

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.