org.apache.myfaces.commons.validator
Class AbstractCSVValidator

java.lang.Object
  extended by org.apache.myfaces.commons.validator.ValidatorBase
      extended by org.apache.myfaces.commons.validator.AbstractCSVValidator
All Implemented Interfaces:
EventListener, javax.faces.component.StateHolder, javax.faces.validator.Validator

@JSFValidator(name="mcv:validateCSV",
              clazz="org.apache.myfaces.commons.validator.CSVValidator",
              tagClass="org.apache.myfaces.commons.validator.ValidateCSVTag",
              serialuidtag="-8874279182242196266L")
public abstract class AbstractCSVValidator
extends ValidatorBase

Validation by validating comma separated values individually.

Version:
$Revision: 1021618 $ $Date: 2010-10-11 23:08:53 -0500 (Mon, 11 Oct 2010) $
Author:
Lance Frohman

Field Summary
static String CSV_INVALID_SEPARATOR_MESSAGE_ID
           
static String CSV_NOT_STRING_MESSAGE_ID
          The message identifiers of the FacesMessage to be created if the check fails.
static String CSV_SUFFIX_MESSAGE_ID
           
static String VALIDATOR_ID
          The standard converter id for this converter.
 
Fields inherited from interface javax.faces.validator.Validator
NOT_IN_RANGE_MESSAGE_ID
 
Constructor Summary
AbstractCSVValidator()
           
 
Method Summary
abstract  String getSeparator()
           
abstract  String getSubvalidatorId()
           
abstract  void setSeparator(String separator)
           
abstract  void setSubvalidatorId(String subvalidatorId)
           
 void validate(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, Object value)
           
 
Methods inherited from class org.apache.myfaces.commons.validator.ValidatorBase
getDetailMessage, getFacesContext, getFacesMessage, getMessage, getStringValue, getSummaryMessage, getValueBinding, isTransient, restoreAttachedState, restoreState, saveAttachedState, saveState, setDetailMessage, setMessage, setSummaryMessage, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALIDATOR_ID

public static final String VALIDATOR_ID

The standard converter id for this converter.

See Also:
Constant Field Values

CSV_NOT_STRING_MESSAGE_ID

public static final String CSV_NOT_STRING_MESSAGE_ID

The message identifiers of the FacesMessage to be created if the check fails.

See Also:
Constant Field Values

CSV_INVALID_SEPARATOR_MESSAGE_ID

public static final String CSV_INVALID_SEPARATOR_MESSAGE_ID
See Also:
Constant Field Values

CSV_SUFFIX_MESSAGE_ID

public static final String CSV_SUFFIX_MESSAGE_ID
See Also:
Constant Field Values
Constructor Detail

AbstractCSVValidator

public AbstractCSVValidator()
Method Detail

getSubvalidatorId

@JSFProperty
public abstract String getSubvalidatorId()
Returns:
the VALIDATOR_ID of the actual validator to be used

setSubvalidatorId

public abstract void setSubvalidatorId(String subvalidatorId)
Parameters:
the - VALIDATOR_ID of the actual validator to be used

getSeparator

@JSFProperty(literalOnly=true)
public abstract String getSeparator()
Returns:
the separator character to separate values

setSeparator

public abstract void setSeparator(String separator)
Parameters:
the - separator character to separate values

validate

public void validate(javax.faces.context.FacesContext facesContext,
                     javax.faces.component.UIComponent uiComponent,
                     Object value)
              throws javax.faces.validator.ValidatorException
Throws:
javax.faces.validator.ValidatorException


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.