All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jsftoolkit.base.renderer.RenderCallback Maven / Gradle / Ivy

Go to download

The core classes for the JSF Toolkit Component Framework. Includes all framework base and utility classes as well as component kick-start/code-generation and registration tools. Also includes some classes for testing that are reused in other projects. They cannot be factored out into a separate project because they are referenced by the tests and they reference this code (circular dependence).

The newest version!
package com.jsftoolkit.base.renderer;

import java.io.IOException;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.render.Renderer;

/**
 * Interface for stateless render callbacks.
 * 

* Each call allows the callback a chance to render. Each method may be treated * the same as the corresponding {@link Renderer} method. (see * {@link HtmlRenderer} for minor differences in * {@link #encodeChildren(FacesContext, UIComponent)}). * * @see HtmlRenderer * * @author noah * */ public interface RenderCallback { /** * Same as {@link Renderer#decode(FacesContext, UIComponent)}. * * @param context * @param component * the component */ void decode(FacesContext context, UIComponent component); /** * Called when the opening callback tag is encountered. * * @param context * @param component * @throws IOException */ void encodeBegin(FacesContext context, UIComponent component) throws IOException; /** * Called if and only if the {@link HtmlRenderer#CHILDREN} tag is a child of * the callback tag and of no other callback tag. e.g. In the template: * *

	 *      <call-foo>
	 *       <call-bar>
	 *         <div>
	 *          <children/>
	 *         </div>
	 *       </call-bar>
	 *      </call-foo>
	 * 
* * {@link #encodeChildren(FacesContext, UIComponent)} will be called on the * callback bar, but not the callback foo. *

* The context for this method differs slightly from a standard * {@link Renderer#encodeChildren(FacesContext, UIComponent)} invocation. * See {@link HtmlRenderer} for details. * * @param context * @param component * @throws IOException */ void encodeChildren(FacesContext context, UIComponent component) throws IOException; /** * Called when the close of the callback tag is encountered. * * @param context * @param component * @throws IOException */ void encodeEnd(FacesContext context, UIComponent component) throws IOException; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy