com.arsdigita.cms.ui
Class UniqueItemNameValidationListener
java.lang.Object
com.arsdigita.cms.ui.util.UniqueStringValidationListener
com.arsdigita.cms.ui.UniqueItemNameValidationListener
- All Implemented Interfaces:
- EventListener, com.arsdigita.bebop.event.FormValidationListener
- public class UniqueItemNameValidationListener
- extends UniqueStringValidationListener
Ensures that the name of the item is unique by resolving the
would-be URL of the item. If an item already "exists" at the URL in the
current context, then the name is invalid.
- Version:
- $Revision: #7 $ $DateTime: 2004/04/07 16:07:11 $
- Author:
- Michael Pih (pihman@arsdigita.com)
Method Summary |
protected ContentSection |
getContentSection(com.arsdigita.bebop.PageState state)
Fetch the current content section. |
protected boolean |
isUnique(com.arsdigita.bebop.PageState state,
String value)
Returns true if the string value is unique, false otherwise. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
versionId
public static final String versionId
- See Also:
- Constant Field Values
UniqueItemNameValidationListener
public UniqueItemNameValidationListener(com.arsdigita.bebop.form.Widget widget)
- Constructor.
- Parameters:
widget
- The widget that contains the name of the item.
UniqueItemNameValidationListener
public UniqueItemNameValidationListener(com.arsdigita.bebop.form.Widget widget,
String errorMsg)
- Constructor.
- Parameters:
widget
- The widget that contains the name of the item.errorMsg
- The error message
isUnique
protected boolean isUnique(com.arsdigita.bebop.PageState state,
String value)
- Returns true if the string value is unique, false otherwise.
- Specified by:
isUnique
in class UniqueStringValidationListener
- Parameters:
state
- The page statevalue
- The submitted string value
- Returns:
- true if the string value is unique, false otherwise
getContentSection
protected ContentSection getContentSection(com.arsdigita.bebop.PageState state)
- Fetch the current content section.
- Parameters:
state
- The page state
- Returns:
- The current content section
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2352 UTC