com.arsdigita.ui.admin
Class URLValidationListener

java.lang.Object
  extended bycom.arsdigita.ui.admin.URLValidationListener
All Implemented Interfaces:
EventListener, ParameterListener

public class URLValidationListener
extends Object
implements ParameterListener

Verifies that the parameter is a valid URL specification. Does this by trying to construct an actual URL object from the parameter and catching any MalformedURLException thrown by the URL constructor.

Note: Validates empty parameters so that URLs can be left blank without generating a form error. If you require a URL be sure to add a NotEmptyValidationListener. This class will also validate a protocol-only URL like "http://".

Version:
$Id: //core-platform/dev/src/com/arsdigita/ui/admin/URLValidationListener.java#9 $
See Also:
NotEmptyValidationListener, URL

Field Summary
static String versionId
           
 
Constructor Summary
URLValidationListener()
          Constructor
URLValidationListener(String label)
          Constructor
 
Method Summary
 void validate(ParameterEvent event)
          Validate the parameter using the URL constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

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

URLValidationListener

public URLValidationListener()
Constructor


URLValidationListener

public URLValidationListener(String label)
Constructor

Method Detail

validate

public void validate(ParameterEvent event)
Validate the parameter using the URL constructor.

Specified by:
validate in interface ParameterListener


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC