|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.myfaces.extensions.validator.core.initializer.component.AbstractHtmlCoreComponentsComponentInitializer
public abstract class AbstractHtmlCoreComponentsComponentInitializer
Basic implementation of a ComponentInitializer which allows an easier handling of required validations and
provides a default implementation for standard components.
| Constructor Summary | |
|---|---|
AbstractHtmlCoreComponentsComponentInitializer()
|
|
| Method Summary | |
|---|---|
void |
configureComponent(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
Map<String,Object> metaData)
If the component is one of the standard input components, the max length attribute is configured and the required attribute is configured (if empty field validation and required initialization is activated) |
protected void |
configureMaxLengthAttribute(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
Map<String,Object> metaData)
This default implementation uses the transformed meta-data stored via the ( CommonMetaDataKeys.MAX_LENGTH
key for initializing e.g. the maxLength attribute of the current component
(of type HtmlInputText or HtmlInputSecret. |
protected abstract void |
configureRequiredAttribute(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
Map<String,Object> metaData)
The concrete implementation has to initialize the component based on the given meta-data map. |
protected boolean |
isRequiredInitializationActive()
Uses the config introduced by prev. |
protected boolean |
isRequiredInitializationSupported(javax.faces.component.UIComponent uiComponent)
if there is no special attribute at the component which should overrule the annotated property return true! |
protected boolean |
processComponent(javax.faces.component.UIComponent uiComponent)
Activates the implementation for special components (-> other components will be ignored). |
protected boolean |
validateEmptyFields()
Uses the config introduced by JSF 2 for specifying if fields without content should be available for required validation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractHtmlCoreComponentsComponentInitializer()
| Method Detail |
|---|
public void configureComponent(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
Map<String,Object> metaData)
configureComponent in interface ComponentInitializerfacesContext - The JSF ContextuiComponent - The component which should be initialisedmetaData - map which contains the transformed meta-dataprotected boolean validateEmptyFields()
protected boolean isRequiredInitializationActive()
protected abstract void configureRequiredAttribute(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
Map<String,Object> metaData)
facesContext - The JSF ContextuiComponent - The UIComponent which should be configured.metaData - map which contains the transformed meta-dataprotected boolean processComponent(javax.faces.component.UIComponent uiComponent)
uiComponent - The UIComponent which should be configured.
protected boolean isRequiredInitializationSupported(javax.faces.component.UIComponent uiComponent)
uiComponent - component which implements the EditableValueHolder interface
protected void configureMaxLengthAttribute(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
Map<String,Object> metaData)
CommonMetaDataKeys.MAX_LENGTH
key for initializing e.g. the maxLength attribute of the current component
(of type HtmlInputText or HtmlInputSecret.
facesContext - The JSF ContextuiComponent - The component to configure.metaData - map which contains the transformed meta-data
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||