Package javax.faces.render

Examples of javax.faces.render.Renderer


      throw new NullPointerException("facesContext");
    }
    if (!component.isRendered()) {
      return;
    }
    Renderer renderer = ComponentUtil.getRenderer(facesContext, component);
    if (renderer != null && renderer instanceof AjaxRenderer) {
      ((AjaxRenderer) renderer).encodeAjax(facesContext, component);
    }
  }
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);
            }
        }
    }
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 (UIComponent child : getChildren())
                    {
                        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);
            }
        }
    }
View Full Code Here

                throw new NullPointerException("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 (rendererType == null)
            return null;
        String renderKitId = context.getViewRoot().getRenderKitId();
        RenderKitFactory rkf = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
        RenderKit renderKit = rkf.getRenderKit(context, renderKitId);
        Renderer renderer = renderKit.getRenderer(getFamily(), rendererType);
        if (renderer == null)
        {
            getFacesContext().getExternalContext().log(
                                                       "No Renderer found for component " + getPathToComponent(this)
                                                               + " (component-family=" + getFamily()
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

    }

    @Override
    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 == null)
        {
            return null;
        }
View Full Code Here

                clientId = idBuilder.append(parentId).append(UINamingContainer.getSeparatorChar(context)).append(clientId)
                        .toString();
            }

            // allow the renderer to convert the clientId
            Renderer renderer = this.getRenderer(context);
            if (renderer != null) {
                this.clientId = renderer.convertClientId(context, clientId);
            } else {
                this.clientId = clientId;
            }
        }
        return this.clientId;
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.