org.apache.myfaces.trinidadinternal.validator
Class RegExpValidator

java.lang.Object
  extended by org.apache.myfaces.trinidad.validator.RegExpValidator
      extended by org.apache.myfaces.trinidadinternal.validator.RegExpValidator
All Implemented Interfaces:
java.util.EventListener, javax.faces.component.StateHolder, javax.faces.validator.Validator, org.apache.myfaces.trinidad.validator.ClientValidator

public class RegExpValidator
extends org.apache.myfaces.trinidad.validator.RegExpValidator
implements org.apache.myfaces.trinidad.validator.ClientValidator


Field Summary
 
Fields inherited from class org.apache.myfaces.trinidad.validator.RegExpValidator
NO_MATCH_MESSAGE_ID, VALIDATOR_ID
 
Fields inherited from interface javax.faces.validator.Validator
NOT_IN_RANGE_MESSAGE_ID
 
Constructor Summary
RegExpValidator()
           
 
Method Summary
 java.util.Collection<java.lang.String> getClientImportNames()
           
 java.lang.String getClientLibrarySource(javax.faces.context.FacesContext context)
           
 java.lang.String getClientScript(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Opportunity for the ClientValidator to return script content.
 java.lang.String getClientValidation(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Called to retrieve the appropriate client validation code for the node and context.
 
Methods inherited from class org.apache.myfaces.trinidad.validator.RegExpValidator
equals, getHint, getMessageDetailNoMatch, getPattern, getValueBinding, hashCode, isTransient, restoreState, saveState, setHint, setMessageDetailNoMatch, setPattern, setTransient, setValueBinding, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegExpValidator

public RegExpValidator()
Method Detail

getClientScript

public java.lang.String getClientScript(javax.faces.context.FacesContext context,
                                        javax.faces.component.UIComponent component)
Opportunity for the ClientValidator to return script content. For HTML, this will be javascript that will be embedded in a script tag. For HTML this method is expected to return an implementation of the javascript Validator object.

This method will be called once per validator instance. Content that should only be written once per request should only be returned once.

Specified by:
getClientScript in interface org.apache.myfaces.trinidad.validator.ClientValidator

getClientValidation

public java.lang.String getClientValidation(javax.faces.context.FacesContext context,
                                            javax.faces.component.UIComponent component)
Called to retrieve the appropriate client validation code for the node and context. For HTML, this will be javascript that will be embedded in a script tag. For HTML this method is expected to return a constructor of the javascript Validator object returned by getClientScript().

Specified by:
getClientValidation in interface org.apache.myfaces.trinidad.validator.ClientValidator

getClientImportNames

public java.util.Collection<java.lang.String> getClientImportNames()
Specified by:
getClientImportNames in interface org.apache.myfaces.trinidad.validator.ClientValidator

getClientLibrarySource

public java.lang.String getClientLibrarySource(javax.faces.context.FacesContext context)
Specified by:
getClientLibrarySource in interface org.apache.myfaces.trinidad.validator.ClientValidator


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.