| org.apache.myfaces.shared_impl.renderkit.html.HtmlRenderer org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase
All known Subclasses: org.apache.myfaces.renderkit.html.HtmlTableRenderer,
HtmlTableRendererBase | public class HtmlTableRendererBase extends HtmlRenderer (Code) | | Common methods for renderers for components that subclass the standard
JSF HtmlDataTable component.
author: Thomas Spiegl (latest modification by $Author: baranda $) version: $Revision: 544646 $ $Date: 2007-06-05 23:51:27 +0200 (Di, 05 Jun 2007) $ |
Inner Class :protected static class Styles | |
Method Summary | |
protected void | afterBody(FacesContext facesContext, UIData uiData) Perform any operations necessary immediately after the TBODY end tag
is output. | protected void | afterColumn(FacesContext facesContext, UIData uiData, int columnIndex) | protected void | afterColumnHeaderOrFooter(FacesContext facesContext, UIData uiData, boolean header, int columnIndex) | protected void | afterRow(FacesContext facesContext, UIData uiData) Perform any operations necessary immediately after each TR end tag
is output. | protected void | afterTable(FacesContext facesContext, UIData uiData) Perform any operations necessary immediately after the TABLE end tag
is output. | protected void | beforeBody(FacesContext facesContext, UIData uiData) Perform any operations necessary after TABLE start tag is output
but before the TBODY start tag. | protected void | beforeColumn(FacesContext facesContext, UIData uiData, int columnIndex) | protected void | beforeColumnHeaderOrFooter(FacesContext facesContext, UIData uiData, boolean header, int columnIndex) | protected void | beforeRow(FacesContext facesContext, UIData uiData) Perform any operations necessary immediately before each TR start tag
is output. | protected void | beforeTable(FacesContext facesContext, UIData uiData) Perform any operations necessary immediately before the TABLE start tag
is output. | public void | decode(FacesContext context, UIComponent component) | protected int | determineChildColSpan(UIComponent uiComponent) Calculate the number of columns the specified child component will span
when rendered.
Normally, this is a fairly simple calculation: a UIColumn component
is rendered as one column, every other child type is not rendered
(ie spans zero columns). | public void | encodeBegin(FacesContext facesContext, UIComponent uiComponent) Render the necessary bits that come before any actual rows in the table. | public void | encodeChildren(FacesContext facesContext, UIComponent component) Render the TBODY section of the html table. | protected void | encodeColumnChild(FacesContext facesContext, ResponseWriter writer, UIData uiData, UIComponent component, Styles styles, int columnStyleIndex) | public void | encodeEnd(FacesContext facesContext, UIComponent uiComponent) | public void | encodeInnerHtml(FacesContext facesContext, UIComponent component) Renders everything inside the TBODY tag by iterating over the row objects
between offsets first and first+rows and applying the UIColumn components
to those objects. | protected static String | getFooterClass(UIComponent component) Gets the footerClass attribute of the given UIComponent .
Parameters: component - the UIComponent . | protected static String | getHeaderClass(UIComponent component) Gets the headerClass attribute of the given UIComponent .
Parameters: component - the UIComponent . | protected int | getNewspaperColumns(UIComponent component) | protected UIComponent | getNewspaperTableSpacer(UIComponent component) | public boolean | getRendersChildren() | protected static Styles | getStyles(UIData uiData) Gets styles for the specified component. | protected boolean | hasFacet(boolean header, UIComponent uiComponent) | protected boolean | hasNewspaperTableSpacer(UIComponent component) | protected void | inBodyStart(FacesContext facesContext, UIData uiData) Perform any operations necessary in the TBODY start tag. | protected boolean | isNewspaperHorizontalOrientation(UIComponent component) | protected void | renderCaptionFacet(FacesContext facesContext, ResponseWriter writer, UIComponent component) Renders the caption facet. | protected void | renderColumnBody(FacesContext facesContext, ResponseWriter writer, UIData uiData, UIComponent component, Styles styles, int columnStyleIndex) 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 isHeader) | 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 a TH cell within a TR within a THEAD section. | 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 for the UIData component
and all the child UIColumn components, as a THEAD or TFOOT element
containing TR (row) elements.
If there is a header or footer attached to the UIData then that is
rendered as a TR element whose COLSPAN is the sum of all rendered
columns in the table. | 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, Styles styles, int rowStyleIndex) Renders the start of a new row of body content. | protected void | renderRowStyle(FacesContext facesContext, ResponseWriter writer, UIData uiData, Styles styles, int rowStyleIndex) | protected void | renderSpacerCell(FacesContext facesContext, ResponseWriter writer, UIComponent component) Renders a spacer between adjacent newspaper columns. | protected void | renderTableFooterRow(FacesContext facesContext, ResponseWriter writer, UIComponent component, UIComponent footerFacet, String footerStyleClass, int colspan) Renders the footer row of the table being rendered.
Parameters: facesContext - the FacesContext . Parameters: writer - the ResponseWriter . Parameters: component - the UIComponent for whom a table is being rendered. Parameters: footerFacet - the facet for the footer. Parameters: footerStyleClass - the styleClass of the footer. Parameters: colspan - the number of columns the header should span. | protected void | renderTableHeaderRow(FacesContext facesContext, ResponseWriter writer, UIComponent component, UIComponent headerFacet, String headerStyleClass, int colspan) Renders the header row of the table being rendered.
Parameters: facesContext - the FacesContext . Parameters: writer - the ResponseWriter . Parameters: component - the UIComponent for whom a table is being rendered. Parameters: headerFacet - the facet for the header. Parameters: headerStyleClass - the styleClass of the header. Parameters: colspan - the number of columns the header should span. |
CAPTION_FACET_NAME | final protected static String CAPTION_FACET_NAME(Code) | | |
FOOTER_FACET_NAME | final protected static String FOOTER_FACET_NAME(Code) | | Footer facet name.
|
HEADER_FACET_NAME | final protected static String HEADER_FACET_NAME(Code) | | Header facet name.
|
afterBody | protected void afterBody(FacesContext facesContext, UIData uiData) throws IOException(Code) | | Perform any operations necessary immediately after the TBODY end tag
is output.
Parameters: facesContext - the FacesContext . Parameters: uiData - the UIData being rendered. |
afterColumn | protected void afterColumn(FacesContext facesContext, UIData uiData, int columnIndex) throws IOException(Code) | | Perform any operations necessary immediately after each column child is rendered
Parameters: facesContext - the FacesContext . Parameters: uiData - the UIData being rendered. Parameters: columnIndex - the index of the currenly rendered column |
afterColumnHeaderOrFooter | protected void afterColumnHeaderOrFooter(FacesContext facesContext, UIData uiData, boolean header, int columnIndex) throws IOException(Code) | | Perform any operations necessary immediately after each column child's header of footer is rendered
Parameters: facesContext - the FacesContext . Parameters: uiData - the UIData being rendered. Parameters: header - true if the header of the column child is rendered Parameters: columnIndex - the index of the currenly rendered column |
afterRow | protected void afterRow(FacesContext facesContext, UIData uiData) throws IOException(Code) | | Perform any operations necessary immediately after each TR end tag
is output.
Parameters: facesContext - the FacesContext . Parameters: uiData - the UIData being rendered. |
afterTable | protected void afterTable(FacesContext facesContext, UIData uiData) throws IOException(Code) | | Perform any operations necessary immediately after the TABLE end tag
is output.
Parameters: facesContext - the FacesContext . Parameters: uiData - the UIData being rendered. |
beforeBody | protected void beforeBody(FacesContext facesContext, UIData uiData) throws IOException(Code) | | Perform any operations necessary after TABLE start tag is output
but before the TBODY start tag.
This method generates the THEAD/TFOOT sections of a table if there
are any header or footer facets defined on the table or on any child
UIColumn component.
Parameters: facesContext - the FacesContext . Parameters: uiData - the UIData being rendered. |
beforeColumn | protected void beforeColumn(FacesContext facesContext, UIData uiData, int columnIndex) throws IOException(Code) | | Perform any operations necessary immediately before each column child is rendered
Parameters: facesContext - the FacesContext . Parameters: uiData - the UIData being rendered. Parameters: columnIndex - the index of the currenly rendered column |
beforeColumnHeaderOrFooter | protected void beforeColumnHeaderOrFooter(FacesContext facesContext, UIData uiData, boolean header, int columnIndex) throws IOException(Code) | | Perform any operations necessary immediately before each column child's header or footer is rendered
Parameters: facesContext - the FacesContext . Parameters: uiData - the UIData being rendered. Parameters: header - true if the header of the column child is rendered Parameters: columnIndex - the index of the currenly rendered column |
beforeRow | protected void beforeRow(FacesContext facesContext, UIData uiData) throws IOException(Code) | | Perform any operations necessary immediately before each TR start tag
is output.
Parameters: facesContext - the FacesContext . Parameters: uiData - the UIData being rendered. |
beforeTable | protected void beforeTable(FacesContext facesContext, UIData uiData) throws IOException(Code) | | Perform any operations necessary immediately before the TABLE start tag
is output.
Parameters: facesContext - the FacesContext . Parameters: uiData - the UIData being rendered. |
determineChildColSpan | protected int determineChildColSpan(UIComponent uiComponent)(Code) | | Calculate the number of columns the specified child component will span
when rendered.
Normally, this is a fairly simple calculation: a UIColumn component
is rendered as one column, every other child type is not rendered
(ie spans zero columns). However custom subclasses of this renderer may
override this method to handle cases where a single component renders
as multiple columns.
|
encodeInnerHtml | public void encodeInnerHtml(FacesContext facesContext, UIComponent component) throws IOException(Code) | | Renders everything inside the TBODY tag by iterating over the row objects
between offsets first and first+rows and applying the UIColumn components
to those objects.
This method is separated from the encodeChildren so that it can be overridden by
subclasses. One class that uses this functionality is autoUpdateDataTable.
|
getFooterClass | protected static String getFooterClass(UIComponent component)(Code) | | Gets the footerClass attribute of the given UIComponent .
Parameters: component - the UIComponent . the footerClass attribute of the given UIComponent . |
getHeaderClass | protected static String getHeaderClass(UIComponent component)(Code) | | Gets the headerClass attribute of the given UIComponent .
Parameters: component - the UIComponent . the headerClass attribute of the given UIComponent . |
getNewspaperColumns | protected int getNewspaperColumns(UIComponent component)(Code) | | Parameters: component - dataTable number of layout columns |
getNewspaperTableSpacer | protected UIComponent getNewspaperTableSpacer(UIComponent component)(Code) | | Parameters: component - dataTable component to display between layout columns |
getStyles | protected static Styles getStyles(UIData uiData)(Code) | | Gets styles for the specified component.
|
hasFacet | protected boolean hasFacet(boolean header, UIComponent uiComponent)(Code) | | Parameters: header - Parameters: uiComponent - boolean |
hasNewspaperTableSpacer | protected boolean hasNewspaperTableSpacer(UIComponent component)(Code) | | Parameters: component - dataTable whether dataTable has component to display between layout columns |
inBodyStart | protected void inBodyStart(FacesContext facesContext, UIData uiData) throws IOException(Code) | | Perform any operations necessary in the TBODY start tag.
Parameters: facesContext - the FacesContext . Parameters: uiData - the UIData being rendered. |
isNewspaperHorizontalOrientation | protected boolean isNewspaperHorizontalOrientation(UIComponent component)(Code) | | Parameters: component - dataTable whether dataTable has newspaper columns layed out horizontally |
renderCaptionFacet | protected void renderCaptionFacet(FacesContext facesContext, ResponseWriter writer, UIComponent component) throws IOException(Code) | | Renders the caption facet.
Parameters: facesContext - the FacesContext . Parameters: writer - the ResponseWriter . Parameters: component - the parent UIComponent containing the facets. throws: IOException - if an exception occurs. |
renderColumnBody | protected void renderColumnBody(FacesContext facesContext, ResponseWriter writer, UIData uiData, UIComponent component, Styles styles, int columnStyleIndex) throws IOException(Code) | | Renders the body of a given UIColumn (everything but
the header and footer facets). This emits a TD cell, whose contents
are the result of calling encodeBegin, encodeChildren and
encodeEnd methods on the component (or its associated renderer).
Parameters: facesContext - the FacesContext . Parameters: writer - the ResponseWriter . Parameters: uiData - the UIData being rendered. Parameters: component - the UIComponent to render. throws: IOException - if an exception occurs. |
renderColumnFooterCell | protected void renderColumnFooterCell(FacesContext facesContext, ResponseWriter writer, UIColumn uiColumn, String footerStyleClass, int colspan) throws IOException(Code) | | Renders the footer facet for the given UIColumn .
Parameters: facesContext - the FacesContext . Parameters: writer - the ResponseWriter . Parameters: uiColumn - the UIComponent . Parameters: footerStyleClass - the styleClass of the footer facet. Parameters: colspan - the colspan for the tableData element in which the footer facetwill be wrapped. throws: IOException - |
renderColumnFooterCell | protected void renderColumnFooterCell(FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent, UIComponent facet, String footerStyleClass, int colspan) throws IOException(Code) | | Renders the footer facet for the given UIColumn .
Parameters: facesContext - the FacesContext . Parameters: writer - the ResponseWriter . Parameters: uiComponent - the UIComponent to render the facet for. Parameters: facet - the UIComponent to render as facet. Parameters: footerStyleClass - the styleClass of the footer facet. Parameters: colspan - the colspan for the tableData element in which the footer facetwill be wrapped. throws: IOException - |
renderColumnFooterRow | protected void renderColumnFooterRow(FacesContext facesContext, ResponseWriter writer, UIComponent component, String footerStyleClass) throws IOException(Code) | | 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 . Parameters: writer - the ResponseWriter . Parameters: component - the UIComponent for whom a table is being rendered. Parameters: footerStyleClass - the styleClass of the footerStyleClass throws: IOException - if an exception occurs. |
renderColumnHeaderCell | protected void renderColumnHeaderCell(FacesContext facesContext, ResponseWriter writer, UIColumn uiColumn, String headerStyleClass, int colspan) throws IOException(Code) | | Renders the header facet for the given UIColumn .
Parameters: facesContext - the FacesContext . Parameters: writer - the ResponseWriter . Parameters: uiColumn - the UIColumn . Parameters: headerStyleClass - the styleClass of the header facet. Parameters: colspan - the colspan for the tableData element in which the header facetwill be wrapped. throws: IOException - |
renderColumnHeaderCell | protected void renderColumnHeaderCell(FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent, UIComponent facet, String headerStyleClass, int colspan) throws IOException(Code) | | Renders a TH cell within a TR within a THEAD section. If the specified
UIColumn object does have a header facet, then that facet is rendered
within the cell, otherwise the cell is left blank (though any specified
style class is still applied to empty cells).
Parameters: facesContext - the FacesContext . Parameters: writer - the ResponseWriter . Parameters: uiComponent - the UIComponent to render the facet for. Parameters: facet - the UIComponent to render as facet. Parameters: headerStyleClass - the styleClass of the header facet. Parameters: colspan - the colspan for the tableData element in which the header facetwill be wrapped. throws: IOException - |
renderColumnHeaderRow | protected void renderColumnHeaderRow(FacesContext facesContext, ResponseWriter writer, UIComponent component, String headerStyleClass) throws IOException(Code) | | 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 . Parameters: writer - the ResponseWriter . Parameters: component - the UIData component for whom a table is being rendered. Parameters: headerStyleClass - the styleClass of the header throws: IOException - if an exception occurs. |
renderFacet | protected void renderFacet(FacesContext facesContext, ResponseWriter writer, UIComponent component, boolean header) throws IOException(Code) | | Renders either the header or the footer facets for the UIData component
and all the child UIColumn components, as a THEAD or TFOOT element
containing TR (row) elements.
If there is a header or footer attached to the UIData then that is
rendered as a TR element whose COLSPAN is the sum of all rendered
columns in the table. This allows that header/footer to take up the
entire width of the table.
If any child column has a header or footer then a TR is rendered
with a TH cell for each column child.
Parameters: facesContext - the FacesContext . Parameters: writer - the ResponseWriter . Parameters: component - the UIData component Parameters: header - whether this is the header facet (if not, then the footer facet). throws: IOException - if an exception occurs. |
renderRowEnd | protected void renderRowEnd(FacesContext facesContext, ResponseWriter writer, UIData uiData) throws IOException(Code) | | Renders the end of a row of body content.
Parameters: facesContext - the FacesContext . Parameters: writer - the ResponseWriter . Parameters: uiData - the UIData being rendered. throws: IOException - if an exceptoin occurs. |
renderRowStart | protected void renderRowStart(FacesContext facesContext, ResponseWriter writer, UIData uiData, Styles styles, int rowStyleIndex) throws IOException(Code) | | Renders the start of a new row of body content.
Parameters: facesContext - the FacesContext . Parameters: writer - the ResponseWriter . Parameters: uiData - the UIData being rendered. throws: IOException - if an exceptoin occurs. |
renderTableFooterRow | protected void renderTableFooterRow(FacesContext facesContext, ResponseWriter writer, UIComponent component, UIComponent footerFacet, String footerStyleClass, int colspan) throws IOException(Code) | | Renders the footer row of the table being rendered.
Parameters: facesContext - the FacesContext . Parameters: writer - the ResponseWriter . Parameters: component - the UIComponent for whom a table is being rendered. Parameters: footerFacet - the facet for the footer. Parameters: footerStyleClass - the styleClass of the footer. Parameters: colspan - the number of columns the header should span. Typically, this isthe number of columns in the table. throws: IOException - if an exception occurs. |
renderTableHeaderRow | protected void renderTableHeaderRow(FacesContext facesContext, ResponseWriter writer, UIComponent component, UIComponent headerFacet, String headerStyleClass, int colspan) throws IOException(Code) | | Renders the header row of the table being rendered.
Parameters: facesContext - the FacesContext . Parameters: writer - the ResponseWriter . Parameters: component - the UIComponent for whom a table is being rendered. Parameters: headerFacet - the facet for the header. Parameters: headerStyleClass - the styleClass of the header. Parameters: colspan - the number of columns the header should span. Typically, this isthe number of columns in the table. throws: IOException - if an exception occurs. |
|
|