|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.render.Renderer org.apache.myfaces.shared_impl.renderkit.html.HtmlRenderer org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase org.apache.myfaces.renderkit.html.HtmlTableRenderer edu.nrao.sss.webapp.faces.renderer.TableRenderer
public class TableRenderer
This class extends Apache MyFace's HtmlTableRenderer to add the ability to render a colspan attribute on UIColumn's. An example usage would be to conditionally assign a colspan value to a UIColumn tag so that some rows of that column span multiple columns, and some don't. Important to note that the columns that the span will be encompassing need to be not rendered under the same conditions.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase |
---|
org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.Styles |
Field Summary | |
---|---|
protected static String |
colspanAttr
|
protected static String |
styleClassAttr
|
Fields inherited from class org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase |
---|
FOOTER_FACET_NAME, HEADER_FACET_NAME |
Constructor Summary | |
---|---|
TableRenderer()
|
Method Summary | |
---|---|
protected void |
beforeBody(FacesContext facesContext,
UIData uiData)
This is rediculous. |
protected int |
getColspan(UIComponent column,
FacesContext ctx)
|
protected String |
getStyleClass(UIComponent column,
FacesContext ctx)
|
protected void |
renderColumnBody(FacesContext facesContext,
ResponseWriter writer,
UIData uiData,
UIComponent component,
org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.Styles styles,
int columnStyleIndex)
Overrides the renderColumnBody method of HtmlTableRenderer to add rendering of a colspan attribute when necessary. |
protected void |
renderColumnHeaderCell(FacesContext facesContext,
ResponseWriter writer,
UIComponent uiComponent,
UIComponent facet,
String headerStyleClass,
int colspan)
Overrides the renderColumnHeaderCell method of HtmlTableRenderer to use the colspan attribute specified in the column tag. |
Methods inherited from class org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase |
---|
afterBody, afterColumn, afterColumnHeaderOrFooter, afterRow, afterTable, beforeColumn, beforeColumnHeaderOrFooter, beforeRow, beforeTable, decode, determineChildColSpan, encodeBegin, encodeChildren, encodeColumnChild, encodeEnd, encodeInnerHtml, getFooterClass, getHeaderClass, getNewspaperColumns, getNewspaperTableSpacer, getRendersChildren, getStyles, hasFacet, hasNewspaperTableSpacer, inBodyStart, isNewspaperHorizontalOrientation, renderColumnChildHeaderOrFooterRow, renderColumnFooterCell, renderColumnFooterCell, renderColumnFooterRow, renderColumnHeaderCell, renderColumnHeaderRow, renderFacet, renderRowEnd, renderRowStart, renderRowStyle, renderSpacerCell, renderTableFooterRow, renderTableHeaderRow |
Methods inherited from class org.apache.myfaces.shared_impl.renderkit.html.HtmlRenderer |
---|
getActionUrl, getChildCount, getChildren, getClientId, renderId, shouldRenderId, toUri |
Methods inherited from class javax.faces.render.Renderer |
---|
convertClientId, getConvertedValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String colspanAttr
protected static final String styleClassAttr
Constructor Detail |
---|
public TableRenderer()
Method Detail |
---|
protected void renderColumnBody(FacesContext facesContext, ResponseWriter writer, UIData uiData, UIComponent component, org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.Styles styles, int columnStyleIndex) throws IOException
renderColumnBody
in class org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase
IOException
protected void renderColumnHeaderCell(FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent, UIComponent facet, String headerStyleClass, int colspan) throws IOException
renderColumnHeaderCell
in class org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase
IOException
protected void beforeBody(FacesContext facesContext, UIData uiData) throws IOException
uiData.setRowIndex(0)
before the headers are rendered so that
the rendered flag of the child UIColumn objects is correctly set. This
step isn't done until we are rendering the body normally. I'm not sure
what the ramifications of doing this early are. It gets reset once body
rendering starts anyway, so hopefully there are none.
beforeBody
in class org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase
IOException
protected int getColspan(UIComponent column, FacesContext ctx)
protected String getStyleClass(UIComponent column, FacesContext ctx)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |