public class RegisterClientSideComponents extends Object implements SystemEventListener
Modifier and Type | Class and Description |
---|---|
protected class |
RegisterClientSideComponents.RequiredClientSideValidator
Client-side validation of "required" components.
|
Modifier and Type | Field and Description |
---|---|
protected static Map<Class<? extends Annotation>,Class<? extends BaseConstraint>> |
beanConstraintMap |
protected static String |
FLAG_PROCESSED_COMPONENTS |
static String |
FLAG_WRITTEN_SHARED_SCRIPT_RESOURCES |
protected static Pattern |
RE_LOCAL_ID |
protected static ClientSideValidator |
REQUIRED_CLIENT_SIDE_VALIDATOR |
protected static Validator |
REQUIRED_VALIDATOR
Fake validator to render "required" client-side validation.
|
Constructor and Description |
---|
RegisterClientSideComponents() |
Modifier and Type | Method and Description |
---|---|
protected String |
calculateLocalId(FacesContext context,
UIComponent component)
Gets the specified component's id,
or the local part of the component's clientId if the component has no fixed id.
|
protected String |
calculateNeutralRowClientId(FacesContext context,
UIComponent component)
Calculates the client id of the component when all the UIData ancestors
are not positioned on a row.
|
protected void |
endScriptTagIfStarted(ResponseWriter writer)
Make sure the response writer has started a script tag.
|
ValueReference |
getReference(ELContext elContext,
ValueExpression expression)
This is used to introspect the ValueReference in order to calculate how
to do the client-side validation for the BeanValidator.
|
boolean |
isListenerForSource(Object source) |
void |
processEvent(SystemEvent event) |
protected void |
registerClientSideBeanValidators(FacesContext context,
UIInput input)
Inspect the bean validation constraints linked to the control value
and add the equivalent client-side validators.
|
protected void |
startScriptTagIfNotStarted(UIComponent component,
ResponseWriter writer)
Make sure the response writer has started a script tag.
|
public static final String FLAG_WRITTEN_SHARED_SCRIPT_RESOURCES
protected static final String FLAG_PROCESSED_COMPONENTS
protected static final Pattern RE_LOCAL_ID
protected static final Map<Class<? extends Annotation>,Class<? extends BaseConstraint>> beanConstraintMap
protected static final Validator REQUIRED_VALIDATOR
protected static final ClientSideValidator REQUIRED_CLIENT_SIDE_VALIDATOR
public boolean isListenerForSource(Object source)
isListenerForSource
in interface SystemEventListener
public void processEvent(SystemEvent event) throws AbortProcessingException
processEvent
in interface SystemEventListener
AbortProcessingException
protected String calculateNeutralRowClientId(FacesContext context, UIComponent component)
protected void startScriptTagIfNotStarted(UIComponent component, ResponseWriter writer) throws IOException
component
- writer
- IOException
protected void endScriptTagIfStarted(ResponseWriter writer) throws IOException
component
- writer
- IOException
protected void registerClientSideBeanValidators(FacesContext context, UIInput input) throws IOException
context
- input
- IOException
protected String calculateLocalId(FacesContext context, UIComponent component)
public ValueReference getReference(ELContext elContext, ValueExpression expression)