Package javax.faces.render

Examples of javax.faces.render.Renderer


        {
            throw new NullPointerException("context");
        }
       
        setCachedRenderer(null);
        Renderer renderer = getRenderer(context);
        if (renderer != null)
        {
            setCachedRenderer(renderer);
            try
            {
                renderer.decode(context, this);
            }
            finally
            {
                setCachedRenderer(null);
            }
View Full Code Here


                // The main issue we have here is that the listeners are normally just registered
                // to UIComponent, how do we deal with inherited ones?
                // We have to ask the EG
                context.getApplication().publishEvent(context,  PreRenderComponentEvent.class, UIComponent.class, this);
   
                Renderer renderer = getRenderer(context);
                if (renderer != null)
                {
                    // If a Renderer is associated with this UIComponent, the actual encoding will be delegated to
                    // Renderer.encodeBegin(FacesContext, UIComponent).
                    renderer.encodeBegin(context, this);
                }
            }
        }
        finally
        {
View Full Code Here

            }
            if (isRendered())
            {
                // If our rendered property is true, render the child UIComponents of this UIComponent.
   
                Renderer renderer = getRenderer(context);
                if (renderer == null)
                {
                    // If no Renderer is associated with this UIComponent, iterate over each of the children of this
                    // component and call UIComponent.encodeAll(javax.faces.context.FacesContext).
                    if (getChildCount() > 0)
                    {
                        for (int i = 0, childCount = getChildCount(); i < childCount; i++)
                        {
                            UIComponent child = getChildren().get(i);
                            child.encodeAll(context);
                        }
                    }
                }
                else
                {
                    // If a Renderer is associated with this UIComponent, the actual encoding will be delegated to
                    // Renderer.encodeChildren(FacesContext, UIComponent).
                    renderer.encodeChildren(context, this);
                }
            }
        }
        finally
        {
View Full Code Here

            }
            setCachedFacesContext(context);
            if (isRendered())
            {
                // If our rendered property is true, render the ending of the current state of this UIComponent.
                Renderer renderer = getRenderer(context);
                if (renderer != null)
                {
                    // If a Renderer is associated with this UIComponent, the actual encoding will be delegated to
                    // Renderer.encodeEnd(FacesContext, UIComponent).
                    renderer.encodeEnd(context, this);
                }
            }
        }
        finally
        {
View Full Code Here

        else
        {
            _clientId = id;
        }

        Renderer renderer = getRenderer(context);
        if (renderer != null)
        {
            _clientId = renderer.convertClientId(context, _clientId);
        }

        // -=Leonardo Uribe=- In jsf 1.1 and 1.2 this warning has sense, but in jsf 2.0 it is common to have
        // components without any explicit id (UIViewParameter components and UIOuput resource components) instances.
        // So, this warning is becoming obsolete in this new context and should be removed.
View Full Code Here

     * </ul>
     */
    @Override
    public boolean getRendersChildren()
    {
        Renderer renderer = getRenderer(getFacesContext());
        return renderer != null ? renderer.getRendersChildren() : false;
    }
View Full Code Here

    {
        if (context == null)
        {
            throw new NullPointerException("context");
        }
        Renderer renderer = getCachedRenderer();
        if (renderer != null)
        {
            return renderer;
        }
        String rendererType = getRendererType();
View Full Code Here

    }
  }

  @Override
  public Renderer getRenderer(String family, String rendererType) {
    Renderer renderer = renderers.get(new Key(family, rendererType));
    if (renderer == null) {
      RenderKit renderKit = getHtmlBasicRenderKit();
      renderer = renderKit.getRenderer(family, rendererType);
      if (renderer != null) {
        renderer = new RendererBaseWrapper(renderer);
View Full Code Here

  public Renderer getRenderer(UIViewRoot viewRoot, String rendererType) {
    return getRenderer(FacesContext.getCurrentInstance(), rendererType);
  }

  public Renderer getRenderer(FacesContext facesContext, String rendererType) {
    Renderer renderer = null;

    if (rendererType != null) {
      ClientPropertiesKey clientKey = ClientPropertiesKey.get(facesContext);
      RendererCacheKey cacheKey = new RendererCacheKey(clientKey, rendererType);
View Full Code Here

import javax.faces.render.Renderer;

public abstract class AbstractUIMenuBar extends UIPanel implements LayoutComponent, OnComponentCreated {

  public void onComponentCreated(FacesContext context, UIComponent parent) {
    Renderer renderer = getRenderer(getFacesContext());
    if (renderer instanceof RendererBase) {
      ((RendererBase) renderer).onComponentCreated(context, this, parent);
    }
  }
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.