Examples of RendererBase


Examples of org.ajax4jsf.renderkit.RendererBase

public class TemplateLoader {
 
  private static final Log log = LogFactory.getLog(TemplateLoader.class);
 
  public static RendererBase loadTemplate(String className) {
    RendererBase template = null;
    try{
      template = (RendererBase)Class.forName(className).newInstance();
    } catch (ClassNotFoundException e) {
      log.error("class not found: " + className );
      throw new FacesException(e);
View Full Code Here

Examples of org.ajax4jsf.renderkit.RendererBase

  }

  private InternetResource findResource(TemplateContext context) {
    InternetResource resource;
    String path = (String) getValue(context);
    RendererBase renderer = context.getRenderer();
    if (renderer != null)  {
      resource = renderer.getResource(path);
    } else {
      resource = InternetResourceBuilder.getInstance().createResource(null, path);
    }
   
    return resource;
View Full Code Here

Examples of org.apache.myfaces.tobago.renderkit.RendererBase

  public static void prepareRendererAll(FacesContext facesContext, UIComponent component) throws IOException {
    if (!component.isRendered()) {
      return;
    }
    RendererBase renderer = ComponentUtils.getRenderer(facesContext, component);
    boolean prepareRendersChildren = false;
    if (renderer != null) {
      renderer.prepareRender(facesContext, component);
      prepareRendersChildren = renderer.getPrepareRendersChildren();
    }
    if (prepareRendersChildren) {
      renderer.prepareRendersChildren(facesContext, component);
    } else {
      Iterator it = component.getFacetsAndChildren();
      while (it.hasNext()) {
        UIComponent child = (UIComponent) it.next();
        prepareRendererAll(facesContext, child);
View Full Code Here

Examples of org.apache.myfaces.tobago.renderkit.RendererBase

  // TODO merge with RenderUtils.prepareRendererAll
  public static void prepareRendererAll(FacesContext facesContext, UIComponent component) throws IOException {
    if (!component.isRendered()) {
      return;
    }
    RendererBase renderer = ComponentUtils.getRenderer(facesContext,  component);
    boolean prepareRendersChildren = false;
    if (renderer != null) {
      renderer.prepareRender(facesContext, component);
      prepareRendersChildren = renderer.getPrepareRendersChildren();
    }
    if (prepareRendersChildren) {
      renderer.prepareRendersChildren(facesContext, component);
    } else {
      Iterator it = component.getFacetsAndChildren();
      while (it.hasNext()) {
        UIComponent child = (UIComponent) it.next();
        prepareRendererAll(facesContext, child);
View Full Code Here

Examples of org.apache.myfaces.tobago.renderkit.RendererBase

  // TODO merge with RenderUtils.prepareRendererAll
  public static void prepareRendererAll(FacesContext facesContext, UIComponent component) throws IOException {
    if (!component.isRendered()) {
      return;
    }
    RendererBase renderer = ComponentUtils.getRenderer(facesContext,  component);
    boolean prepareRendersChildren = false;
    if (renderer != null) {
      renderer.prepareRender(facesContext, component);
      prepareRendersChildren = renderer.getPrepareRendersChildren();
    }
    if (prepareRendersChildren) {
      renderer.prepareRendersChildren(facesContext, component);
    } else {
      Iterator it = component.getFacetsAndChildren();
      while (it.hasNext()) {
        UIComponent child = (UIComponent) it.next();
        prepareRendererAll(facesContext, child);
View Full Code Here

Examples of org.apache.myfaces.tobago.renderkit.RendererBase

    }

    Map<String, Object> requestMap = (Map<String, Object>) facesContext.getExternalContext().getRequestMap();
    StringBuilder key = new StringBuilder(RENDER_KEY_PREFIX);
    key.append(rendererType);
    RendererBase renderer = (RendererBase) requestMap.get(key.toString());

    if (renderer == null) {
      Renderer myRenderer = getRendererInternal(facesContext, family, rendererType);
      if (myRenderer instanceof RendererBase) {
        requestMap.put(key.toString(), myRenderer);
View Full Code Here

Examples of org.apache.myfaces.tobago.renderkit.RendererBase

      throw new NullPointerException("facesContext");
    }
    if (!component.isRendered()) {
      return;
    }
    RendererBase renderer = ComponentUtils.getRenderer(facesContext, component);
    if (renderer != null && renderer instanceof AjaxRenderer) {
      ((AjaxRenderer) renderer).encodeAjax(facesContext, component);
    }
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.renderkit.RendererBase

  public static void prepareRendererAll(FacesContext facesContext, UIComponent component) throws IOException {
    if (!component.isRendered()) {
      return;
    }
    RendererBase renderer = ComponentUtils.getRenderer(facesContext, component);
    boolean prepareRendersChildren = false;
    if (renderer != null) {
      renderer.prepareRender(facesContext, component);
      prepareRendersChildren = renderer.getPrepareRendersChildren();
    }
    if (prepareRendersChildren) {
      renderer.prepareRendersChildren(facesContext, component);
    } else {
      Iterator it = component.getFacetsAndChildren();
      while (it.hasNext()) {
        UIComponent child = (UIComponent) it.next();
        prepareRendererAll(facesContext, child);
View Full Code Here

Examples of org.apache.myfaces.tobago.renderkit.RendererBase

  public static RendererBase getRenderer(FacesContext facesContext, String family, String rendererType) {
    if (rendererType == null) {
      return null;
    }

    RendererBase renderer;

    Map requestMap = facesContext.getExternalContext().getRequestMap();
    renderer = (RendererBase) requestMap.get(RENDER_KEY_PREFIX + rendererType);

    if (renderer == null) {
View Full Code Here

Examples of org.apache.myfaces.tobago.renderkit.RendererBase

          component.getAttributes().remove(ATTR_INNER_HEIGHT);
        }
      }
    }
    if (space > 0) {
      RendererBase renderer = ComponentUtil.getRenderer(facesContext, component);
      if (layoutSpace != null
          || !ComponentUtil.getBooleanAttribute(component, ATTR_INLINE)) {
        int styleSpace = space;
        if (renderer != null) {
          if (width) {
            styleSpace -= renderer.getComponentExtraWidth(facesContext, component);
          } else {
            styleSpace -= renderer.getComponentExtraHeight(facesContext, component);
          }
        }

        replaceStyleAttribute(component, styleAttribute, styleSpace);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.