public class HtmlTableLayoutRenderer extends HtmlLayoutRenderer
This implementation recognizes the following <f:facet>
names:
header
footer
This implementation recognizes the following <f:param>
parameters:
tableStyle
- CSS styles to apply to outer table tag
tableStyleClass
- CSS style class to apply to outer table tag
columns - number of columns. Each label/component pair is considered one column
columnClasses
- comma delimited string of CSS style classes to apply to table
columns in order of: label, component, required
labelStyle
- CSS styles to apply to label column
componentStyle
- CSS styles to apply to component column
requiredStyle
- CSS styles to apply to required column (ie. the star)
headerStyle
- CSS styles to apply to table header
headerStyleClass
- CSS style class to apply to table header
footerStyle
- CSS styles to apply to table footer
footerStyleClass
- CSS style class to apply to table footer
rowClasses
- comma delimited string of CSS style classes to apply to alternating
table rows
labelSuffix
- suffix to put after the label name. Defaults to a colon (ie.
'Name:')
The parameters columns
and columnClasses
might more properly be named
numberOfColumns
and columnStyleClasses
, but we are trying to follow the
javax.faces.component.html.HtmlDataTable
convention.
Constructor and Description |
---|
HtmlTableLayoutRenderer() |
Modifier and Type | Method and Description |
---|---|
void |
encodeBegin(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent metawidgetComponent) |
void |
encodeChildren(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent metawidget) |
void |
encodeEnd(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent metawidget) |
protected String |
getCssId(javax.faces.component.UIComponent metawidget) |
protected boolean |
hasHtmlInputHiddenChildren(javax.faces.component.UIComponent metawidget)
Determines if the Metawidget has children which are instances of
javax.faces.component.html.HtmlInputHidden . |
protected void |
layoutAfterChild(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent metawidget,
javax.faces.component.UIComponent childComponent) |
protected void |
layoutBeforeChild(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent metawidget,
javax.faces.component.UIComponent childComponent) |
protected void |
layoutHtmlInputHiddenChildren(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent metawidget)
Layout any
javax.faces.component.html.HtmlInputHidden children first, before the
<table>. |
protected boolean |
layoutLabel(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent metawidget,
javax.faces.component.UIComponent componentNeedingLabel)
Render the label text.
|
protected void |
layoutRequired(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent metawidget,
javax.faces.component.UIComponent child) |
protected void |
writeColumnStyleClass(javax.faces.component.UIComponent metawidget,
javax.faces.context.ResponseWriter writer,
int columnStyleClass) |
protected void |
writeRowStyleClass(javax.faces.component.UIComponent metawidget,
javax.faces.context.ResponseWriter writer,
int rowStyleClass) |
createInlineMessage, createLabel, getLabelText, getRendersChildren, layoutChild, writeStyleAndClass
public void encodeBegin(javax.faces.context.FacesContext context, javax.faces.component.UIComponent metawidgetComponent) throws IOException
encodeBegin
in class HtmlLayoutRenderer
IOException
protected boolean hasHtmlInputHiddenChildren(javax.faces.component.UIComponent metawidget)
javax.faces.component.html.HtmlInputHidden
. If so, the hidden fields will be
written as siblings of the <table> and the whole thing wrapped in an outer
<div>.protected void layoutHtmlInputHiddenChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent metawidget) throws IOException
javax.faces.component.html.HtmlInputHidden
children first, before the
<table>.IOException
public void encodeChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent metawidget) throws IOException
encodeChildren
in class javax.faces.render.Renderer
IOException
public void encodeEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent metawidget) throws IOException
encodeEnd
in class javax.faces.render.Renderer
IOException
protected void layoutBeforeChild(javax.faces.context.FacesContext context, javax.faces.component.UIComponent metawidget, javax.faces.component.UIComponent childComponent) throws IOException
IOException
protected boolean layoutLabel(javax.faces.context.FacesContext context, javax.faces.component.UIComponent metawidget, javax.faces.component.UIComponent componentNeedingLabel) throws IOException
HtmlLayoutRenderer
HtmlOutputText
renderer, so that
it is properly escaped. Any JSF EL expressions embedded in the label should have already been
evaluated by FacesInspectionResultProcessor
.layoutLabel
in class HtmlLayoutRenderer
IOException
protected void layoutAfterChild(javax.faces.context.FacesContext context, javax.faces.component.UIComponent metawidget, javax.faces.component.UIComponent childComponent) throws IOException
IOException
protected void layoutRequired(javax.faces.context.FacesContext context, javax.faces.component.UIComponent metawidget, javax.faces.component.UIComponent child) throws IOException
IOException
protected String getCssId(javax.faces.component.UIComponent metawidget)
protected void writeColumnStyleClass(javax.faces.component.UIComponent metawidget, javax.faces.context.ResponseWriter writer, int columnStyleClass) throws IOException
IOException
protected void writeRowStyleClass(javax.faces.component.UIComponent metawidget, javax.faces.context.ResponseWriter writer, int rowStyleClass) throws IOException
IOException
Copyright © 2015. All Rights Reserved.