org.apache.myfaces.custom.urlvalidator
Class UrlValidator

java.lang.Object
  extended by org.apache.myfaces.validator.ValidatorBase
      extended by org.apache.myfaces.custom.urlvalidator.UrlValidator
All Implemented Interfaces:
java.util.EventListener, javax.faces.component.StateHolder, javax.faces.validator.Validator

public class UrlValidator
extends org.apache.myfaces.validator.ValidatorBase

Version:
$Revision: $ $Date: $
Author:
Fabian Frederick

Field Summary
static java.lang.String URL_MESSAGE_ID
          The message identifier of the FacesMessage to be created if the maximum length check fails.
static java.lang.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
UrlValidator()
           
 
Method Summary
 void validate(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, java.lang.Object value)
          method that validates an url address.
 
Methods inherited from class org.apache.myfaces.validator.ValidatorBase
getDetailMessage, getFacesContext, getFacesMessage, getMessage, 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 java.lang.String VALIDATOR_ID

The standard converter id for this converter.

See Also:
Constant Field Values

URL_MESSAGE_ID

public static final java.lang.String URL_MESSAGE_ID

The message identifier of the FacesMessage to be created if the maximum length check fails.

See Also:
Constant Field Values
Constructor Detail

UrlValidator

public UrlValidator()
Method Detail

validate

public void validate(javax.faces.context.FacesContext facesContext,
                     javax.faces.component.UIComponent uiComponent,
                     java.lang.Object value)
              throws javax.faces.validator.ValidatorException
method that validates an url address. it uses the commons-validator

Throws:
javax.faces.validator.ValidatorException


Copyright © 2010. All Rights Reserved.