public class ValidatorInputRenderer
extends javax.faces.render.Renderer
This renderer is a hybrid renderer decorator that is dynamically
registered by the ValidatorRenderKit
for component renderers in the "javax.faces.Input" family.
Modifier and Type | Field and Description |
---|---|
static String |
VALIDATOR_CLIENTIDS_ATTR
This constant is the name of a reserved attribute that will hold
a
Map of clientId's for the component. |
Constructor and Description |
---|
ValidatorInputRenderer(javax.faces.render.Renderer defaultRenderer)
Overloaded constructor is passed the original
Renderer . |
Modifier and Type | Method and Description |
---|---|
String |
convertClientId(javax.faces.context.FacesContext context,
String id) |
void |
decode(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component) |
void |
encodeBegin(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
This override captures the clientId of the target component before
passing on to the original renderer.
|
void |
encodeChildren(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component) |
void |
encodeEnd(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component) |
Object |
getConvertedValue(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object value) |
boolean |
getRendersChildren() |
public static final String VALIDATOR_CLIENTIDS_ATTR
This constant is the name of a reserved attribute that will hold
a Map
of clientId's for the component.
public ValidatorInputRenderer(javax.faces.render.Renderer defaultRenderer)
Overloaded constructor is passed the original
Renderer
.
defaultRenderer
- The Renderer we should wrappublic String convertClientId(javax.faces.context.FacesContext context, String id)
convertClientId
in class javax.faces.render.Renderer
public void decode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
decode
in class javax.faces.render.Renderer
public void encodeBegin(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws IOException
This override captures the clientId of the target component before
passing on to the original renderer. The clientId is added to a Map
that is used by the ValidatorScript
component for adding client side JavaScript validation. This hook is
needed when the CommonsValidator
is added to a UIData subclass. The components in this class are not
unique per row so the clientId can only be captured during the rendering
process. The Map also contains a snapshot of validator var arguments
that contain value binding expressions. This snapshot of state at
renderering is used by the client side JavaScript. The snapshot
allows client side validation in UIData components.
encodeBegin
in class javax.faces.render.Renderer
context
- FacesContext for the current requestcomponent
- UIComponent being renderedIOException
- if an input/output error occurspublic 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 component) throws IOException
encodeEnd
in class javax.faces.render.Renderer
IOException
public Object getConvertedValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object value) throws javax.faces.convert.ConverterException
getConvertedValue
in class javax.faces.render.Renderer
javax.faces.convert.ConverterException
public boolean getRendersChildren()
getRendersChildren
in class javax.faces.render.Renderer
Copyright © 2004-2013 Apache Software Foundation. All Rights Reserved.