org.apache.myfaces.renderkit.html

Class HtmlTableRendererBase

Known Direct Subclasses:
HtmlTableRenderer

public class HtmlTableRendererBase
extends HtmlRenderer

Version:
$Revision: 279726 $ $Date: 2005-09-09 09:50:08 +0200 (Fri, 09 Sep 2005) $
Author:
Thomas Spiegl (latest modification by $Author: svieujot $)

Field Summary

protected static String
FOOTER_FACET_NAME
Footer facet name.
protected static String
HEADER_FACET_NAME
Header facet name.

Method Summary

protected void
afterRow(FacesContext facesContext, UIData uiData)
Convenient method for derived table renderers.
protected void
afterTable(FacesContext facesContext, UIData uiData)
Convenient method for derived table renderers.
protected void
beforeRow(FacesContext facesContext, UIData uiData)
Convenient method for derived table renderers.
protected void
beforeTable(FacesContext facesContext, UIData uiData)
Convenient method for derived table renderers.
void
decode(FacesContext context, UIComponent component)
protected int
determineChildColSpan(UIComponent uiComponent)
void
encodeBegin(FacesContext facesContext, UIComponent uiComponent)
void
encodeChildren(FacesContext facesContext, UIComponent component)
protected void
encodeColumnChild(FacesContext facesContext, ResponseWriter writer, UIData uiData, UIComponent component, Iterator columnStyleIterator)
void
encodeEnd(FacesContext facesContext, UIComponent uiComponent)
void
encodeInnerHtml(FacesContext facesContext, UIComponent component)
Renders everything inside the
protected static String
getFooterClass(UIComponent component)
Gets the footerClass attribute of the given UIComponent.
protected static String
getHeaderClass(UIComponent component)
Gets the headerClass attribute of the given UIComponent.
boolean
getRendersChildren()
protected boolean
hasFacet(boolean header, UIComponent uiComponent)
protected void
renderColumnBody(FacesContext facesContext, ResponseWriter writer, UIData uiData, UIComponent component, Iterator columnStyleIterator)
Renders the body of a given UIColumn (everything but the header and footer facets).
protected void
renderColumnChildHeaderOrFooterRow(FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent, String styleClass, boolean header)
protected void
renderColumnFooterCell(FacesContext facesContext, ResponseWriter writer, UIColumn uiColumn, String footerStyleClass, int colspan)
Renders the footer facet for the given UIColumn.
protected void
renderColumnFooterCell(FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent, UIComponent facet, String footerStyleClass, int colspan)
Renders the footer facet for the given UIColumn.
protected void
renderColumnFooterRow(FacesContext facesContext, ResponseWriter writer, UIComponent component, String footerStyleClass)
Renders the footer row for the columns, which is a separate row from the footer row for the UIData footer facet.
protected void
renderColumnHeaderCell(FacesContext facesContext, ResponseWriter writer, UIColumn uiColumn, String headerStyleClass, int colspan)
Renders the header facet for the given UIColumn.
protected void
renderColumnHeaderCell(FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent, UIComponent facet, String headerStyleClass, int colspan)
Renders the header facet for the given UIColumn.
protected void
renderColumnHeaderRow(FacesContext facesContext, ResponseWriter writer, UIComponent component, String headerStyleClass)
Renders the header row for the columns, which is a separate row from the header row for the UIData header facet.
protected void
renderFacet(FacesContext facesContext, ResponseWriter writer, UIComponent component, boolean header)
Renders either the header or the footer facets.
protected void
renderRowEnd(FacesContext facesContext, ResponseWriter writer, UIData uiData)
Renders the end of a row of body content.
protected void
renderRowStart(FacesContext facesContext, ResponseWriter writer, UIData uiData, Iterator rowStyleIterator)
Renders the start of a new row of body content.
protected void
renderRowStyle(FacesContext facesContext, ResponseWriter writer, UIData uiData, Iterator rowStyleIterator)
protected void
renderTableFooterRow(FacesContext facesContext, ResponseWriter writer, UIComponent component, UIComponent footerFacet, String footerStyleClass, int colspan)
Renders the footer row of the table being rendered.
protected void
renderTableHeaderRow(FacesContext facesContext, ResponseWriter writer, UIComponent component, UIComponent headerFacet, String headerStyleClass, int colspan)
Renders the header row of the table being rendered.

Methods inherited from class org.apache.myfaces.renderkit.html.HtmlRenderer

encodeChildren

Field Details

FOOTER_FACET_NAME

protected static final String FOOTER_FACET_NAME
Footer facet name.

HEADER_FACET_NAME

protected static final String HEADER_FACET_NAME
Header facet name.

Method Details

afterRow

protected void afterRow(FacesContext facesContext,
                        UIData uiData)
            throws IOException
Convenient method for derived table renderers.
Parameters:
facesContext - the FacesContext.
uiData - the UIData being rendered.

afterTable

protected void afterTable(FacesContext facesContext,
                          UIData uiData)
            throws IOException
Convenient method for derived table renderers.
Parameters:
facesContext - the FacesContext.
uiData - the UIData being rendered.

beforeRow

protected void beforeRow(FacesContext facesContext,
                         UIData uiData)
            throws IOException
Convenient method for derived table renderers.
Parameters:
facesContext - the FacesContext.
uiData - the UIData being rendered.

beforeTable

protected void beforeTable(FacesContext facesContext,
                           UIData uiData)
            throws IOException
Convenient method for derived table renderers.
Parameters:
facesContext - the FacesContext.
uiData - the UIData being rendered.

decode

public void decode(FacesContext context,
                   UIComponent component)

determineChildColSpan

protected int determineChildColSpan(UIComponent uiComponent)

encodeBegin

public void encodeBegin(FacesContext facesContext,
                        UIComponent uiComponent)
            throws IOException
See Also:
javax.faces.render.Renderer.encodeBegin(FacesContext, UIComponent)

encodeChildren

public void encodeChildren(FacesContext facesContext,
                           UIComponent component)
            throws IOException
Overrides:
encodeChildren in interface HtmlRenderer
See Also:
javax.faces.render.Renderer.encodeChildren(FacesContext, UIComponent)

encodeColumnChild

protected void encodeColumnChild(FacesContext facesContext,
                                 ResponseWriter writer,
                                 UIData uiData,
                                 UIComponent component,
                                 Iterator columnStyleIterator)
            throws IOException

encodeEnd

public void encodeEnd(FacesContext facesContext,
                      UIComponent uiComponent)
            throws IOException
See Also:
javax.faces.render.Renderer.encodeEnd(FacesContext, UIComponent)

encodeInnerHtml

public void encodeInnerHtml(FacesContext facesContext,
                            UIComponent component)
            throws IOException
Renders everything inside the

getFooterClass

protected static String getFooterClass(UIComponent component)
Gets the footerClass attribute of the given UIComponent.
Parameters:
component - the UIComponent.
Returns:
the footerClass attribute of the given UIComponent.

getHeaderClass

protected static String getHeaderClass(UIComponent component)
Gets the headerClass attribute of the given UIComponent.
Parameters:
component - the UIComponent.
Returns:
the headerClass attribute of the given UIComponent.

getRendersChildren

public boolean getRendersChildren()
See Also:
javax.faces.render.Renderer.getRendersChildren()

hasFacet

protected boolean hasFacet(boolean header,
                           UIComponent uiComponent)
Parameters:
header -
uiComponent -
Returns:
boolean

renderColumnBody

protected void renderColumnBody(FacesContext facesContext,
                                ResponseWriter writer,
                                UIData uiData,
                                UIComponent component,
                                Iterator columnStyleIterator)
            throws IOException
Renders the body of a given UIColumn (everything but the header and footer facets).
Parameters:
facesContext - the FacesContext.
writer - the ResponseWriter.
uiData - the UIData being rendered.
component - the UIComponent to render.
columnStyleIterator - the styleClass of the UIColumn or null if there is none.

renderColumnChildHeaderOrFooterRow

protected void renderColumnChildHeaderOrFooterRow(FacesContext facesContext,
                                                  ResponseWriter writer,
                                                  UIComponent uiComponent,
                                                  String styleClass,
                                                  boolean header)
            throws IOException

renderColumnFooterCell

protected void renderColumnFooterCell(FacesContext facesContext,
                                      ResponseWriter writer,
                                      UIColumn uiColumn,
                                      String footerStyleClass,
                                      int colspan)
            throws IOException
Renders the footer facet for the given UIColumn.
Parameters:
facesContext - the FacesContext.
writer - the ResponseWriter.
uiColumn - the UIComponent.
footerStyleClass - the styleClass of the footer facet.
colspan - the colspan for the tableData element in which the footer facet will be wrapped.

renderColumnFooterCell

protected void renderColumnFooterCell(FacesContext facesContext,
                                      ResponseWriter writer,
                                      UIComponent uiComponent,
                                      UIComponent facet,
                                      String footerStyleClass,
                                      int colspan)
            throws IOException
Renders the footer facet for the given UIColumn.
Parameters:
facesContext - the FacesContext.
writer - the ResponseWriter.
uiComponent - the UIComponent to render the facet for.
facet - the UIComponent to render as facet.
footerStyleClass - the styleClass of the footer facet.
colspan - the colspan for the tableData element in which the footer facet will be wrapped.

renderColumnFooterRow

protected void renderColumnFooterRow(FacesContext facesContext,
                                     ResponseWriter writer,
                                     UIComponent component,
                                     String footerStyleClass)
            throws IOException
Renders the footer row for the columns, which is a separate row from the footer row for the UIData footer facet.
Parameters:
facesContext - the FacesContext.
writer - the ResponseWriter.
component - the UIComponent for whom a table is being rendered.
footerStyleClass - the styleClass of the footerStyleClass

renderColumnHeaderCell

protected void renderColumnHeaderCell(FacesContext facesContext,
                                      ResponseWriter writer,
                                      UIColumn uiColumn,
                                      String headerStyleClass,
                                      int colspan)
            throws IOException
Renders the header facet for the given UIColumn.
Parameters:
facesContext - the FacesContext.
writer - the ResponseWriter.
uiColumn - the UIColumn.
headerStyleClass - the styleClass of the header facet.
colspan - the colspan for the tableData element in which the header facet will be wrapped.

renderColumnHeaderCell

protected void renderColumnHeaderCell(FacesContext facesContext,
                                      ResponseWriter writer,
                                      UIComponent uiComponent,
                                      UIComponent facet,
                                      String headerStyleClass,
                                      int colspan)
            throws IOException
Renders the header facet for the given UIColumn.
Parameters:
facesContext - the FacesContext.
writer - the ResponseWriter.
uiComponent - the UIComponent to render the facet for.
facet - the UIComponent to render as facet.
headerStyleClass - the styleClass of the header facet.
colspan - the colspan for the tableData element in which the header facet will be wrapped.

renderColumnHeaderRow

protected void renderColumnHeaderRow(FacesContext facesContext,
                                     ResponseWriter writer,
                                     UIComponent component,
                                     String headerStyleClass)
            throws IOException
Renders the header row for the columns, which is a separate row from the header row for the UIData header facet.
Parameters:
facesContext - the FacesContext.
writer - the ResponseWriter.
component - the UIComponent for whom a table is being rendered.
headerStyleClass - the styleClass of the header

renderFacet

protected void renderFacet(FacesContext facesContext,
                           ResponseWriter writer,
                           UIComponent component,
                           boolean header)
            throws IOException
Renders either the header or the footer facets.
Parameters:
facesContext - the FacesContext.
writer - the ResponseWriter.
component - the parent UIComponent containing the facets.
header - whether this is the header facet (if not, then the footer facet).

renderRowEnd

protected void renderRowEnd(FacesContext facesContext,
                            ResponseWriter writer,
                            UIData uiData)
            throws IOException
Renders the end of a row of body content.
Parameters:
facesContext - the FacesContext.
writer - the ResponseWriter.
uiData - the UIData being rendered.

renderRowStart

protected void renderRowStart(FacesContext facesContext,
                              ResponseWriter writer,
                              UIData uiData,
                              Iterator rowStyleIterator)
            throws IOException
Renders the start of a new row of body content.
Parameters:
facesContext - the FacesContext.
writer - the ResponseWriter.
uiData - the UIData being rendered.
rowStyleIterator - te styleClass of the row or null if there is none.

renderRowStyle

protected void renderRowStyle(FacesContext facesContext,
                              ResponseWriter writer,
                              UIData uiData,
                              Iterator rowStyleIterator)
            throws IOException

renderTableFooterRow

protected void renderTableFooterRow(FacesContext facesContext,
                                    ResponseWriter writer,
                                    UIComponent component,
                                    UIComponent footerFacet,
                                    String footerStyleClass,
                                    int colspan)
            throws IOException
Renders the footer row of the table being rendered.
Parameters:
facesContext - the FacesContext.
writer - the ResponseWriter.
component - the UIComponent for whom a table is being rendered.
footerFacet - the facet for the footer.
footerStyleClass - the styleClass of the footer.
colspan - the number of columns the header should span. Typically, this is the number of columns in the table.

renderTableHeaderRow

protected void renderTableHeaderRow(FacesContext facesContext,
                                    ResponseWriter writer,
                                    UIComponent component,
                                    UIComponent headerFacet,
                                    String headerStyleClass,
                                    int colspan)
            throws IOException
Renders the header row of the table being rendered.
Parameters:
facesContext - the FacesContext.
writer - the ResponseWriter.
component - the UIComponent for whom a table is being rendered.
headerFacet - the facet for the header.
headerStyleClass - the styleClass of the header.
colspan - the number of columns the header should span. Typically, this is the number of columns in the table.