public class HtmlDivLayoutRenderer extends HtmlLayoutRenderer
DIV
tags, with one DIV
per label and
per widget, and a wrapper DIV
around both.
This implementation recognizes the following <f:param>
parameters:
divStyleClasses
- comma separated list of style classes to apply to the DIVs, in
order of outer, label, required, component, errors
outerStyle
- CSS styles to apply to the outer DIV
labelStyle
- CSS styles to apply to the label DIV
componentStyle
- this is the style applied to the DIV around the
component, not to the component itself. The component itself can be styled using the
style
attribute on the Metawidget tag
requiredStyle
- CSS styles to apply to the required DIV
Constructor and Description |
---|
HtmlDivLayoutRenderer() |
Modifier and Type | Method and Description |
---|---|
protected javax.faces.component.UIComponent |
createInlineMessage(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent metawidget,
String messageFor)
Creates an inline
HtmlMessage attached to the given messageFor id. |
void |
encodeBegin(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent metawidgetComponent) |
void |
encodeChildren(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component) |
void |
encodeEnd(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent metawidget) |
protected void |
layoutAfterChild(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent metawidget,
javax.faces.component.UIComponent child) |
protected void |
layoutBeforeChild(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent metawidget,
javax.faces.component.UIComponent componentChild) |
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 |
writeStyleClass(javax.faces.component.UIComponent metawidget,
javax.faces.context.ResponseWriter writer,
int styleClass) |
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
public void encodeChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) 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 javax.faces.component.UIComponent createInlineMessage(javax.faces.context.FacesContext context, javax.faces.component.UIComponent metawidget, String messageFor)
HtmlLayoutRenderer
HtmlMessage
attached to the given messageFor
id.
Subclasses can override this method to create a different messaging object, such as an
HtmlMessages
(with an 's').
createInlineMessage
in class HtmlLayoutRenderer
protected void layoutBeforeChild(javax.faces.context.FacesContext context, javax.faces.component.UIComponent metawidget, javax.faces.component.UIComponent componentChild) 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 layoutRequired(javax.faces.context.FacesContext context, javax.faces.component.UIComponent metawidget, javax.faces.component.UIComponent child) throws IOException
IOException
protected void layoutAfterChild(javax.faces.context.FacesContext context, javax.faces.component.UIComponent metawidget, javax.faces.component.UIComponent child) throws IOException
metawidget
- the Metawidget doing the layoutchild
- the component being laid outIOException
protected void writeStyleClass(javax.faces.component.UIComponent metawidget, javax.faces.context.ResponseWriter writer, int styleClass) throws IOException
IOException
Copyright © 2015. All Rights Reserved.