xdoclet.modules.apache.struts

Class StrutsValidatorTagsHandler

public class StrutsValidatorTagsHandler extends AbstractProgramElementTagsHandler

Struts Validator tag handler tags

Version: $Revision: 1.12 $

Author: Erik Hatcher (ehatcher@apache.org)

UNKNOWN: August 23, 2002 namespace = "Validator"

Field Summary
protected Mapargs
protected StringcurFieldName
protected StringcurrentArgKey
protected static ListsupportedTypes
Method Summary
StringargIndex(Properties props)
Current argument index number (0 to 3).
StringargName(Properties props)
Current argument name - only valid if argument is for a specific validator type.
StringargValue(Properties props)
Current argument value, which is either an inline value or resource key.
StringfieldName(Properties props)
Returns the current field's name, local to the indexed property if there is one.
voidforAllFieldArgs(String template, Properties attributes)
Iterates over all arguments for the current field.
voidforAllFields(String template, Properties attributes)
Iterates the body for each field of the current form requiring validation.
voidforAllForms(String template, Properties attributes)
Iterates over all Struts Form beans and evaluates the body of the tag for each class.
StringformName(Properties attributes)
Gets the "name" attribute for the <form> element in the xml descriptor.
protected MapgetFields(XClass clazz)
protected MapgetFields(XClass clazz, String prefix)
voidifArgIsForType(String template, Properties attributes)
Evaluates the body if the current argument is a validator-specific argument.
voidifArgIsResource(String template, Properties attributes)
Evaluates body if current argument is a resource key.
voidifArgIsValue(String template, Properties attributes)
Evaluates the body if the current argument is an inline value rather than a resource key.
voidifFieldIsIndexed(String template, Properties attributes)
Evaluates the body if the current field has an indexed component.
voidifFormHasFields(String template, Properties attributes)
Evaluates the body if form has fields requiring validation.
voidifNoArg0(String template, Properties attributes)
Evaluates the body if there is no arg0 specified.
StringindexedListProperty(Properties props)
Returns the current field's indexedListProperty attribute, if any.
protected voidloadFieldArguments()
StringvalidatorList(Properties props)
Returns a comma-separated list of the specified validator types.

Field Detail

args

protected Map args

curFieldName

protected String curFieldName

currentArgKey

protected String currentArgKey

supportedTypes

protected static final List supportedTypes

Method Detail

argIndex

public String argIndex(Properties props)
Current argument index number (0 to 3).

Parameters: props The content tag attributes.

Returns: current argument index

UNKNOWN: type = "content"

argName

public String argName(Properties props)
Current argument name - only valid if argument is for a specific validator type.

Parameters: props The content tag attributes.

Returns: current argument name

UNKNOWN: type = "content"

argValue

public String argValue(Properties props)
Current argument value, which is either an inline value or resource key.

Parameters: props The content tag attributes.

Returns: current argument value

UNKNOWN: type = "content"

fieldName

public String fieldName(Properties props)
Returns the current field's name, local to the indexed property if there is one.

Parameters: props The content tag attributes.

Returns: current field name

UNKNOWN: type = "content"

forAllFieldArgs

public void forAllFieldArgs(String template, Properties attributes)
Iterates over all arguments for the current field.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException

UNKNOWN: type = "block"

forAllFields

public void forAllFields(String template, Properties attributes)
Iterates the body for each field of the current form requiring validation.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException

UNKNOWN: type = "block"

forAllForms

public void forAllForms(String template, Properties attributes)
Iterates over all Struts Form beans and evaluates the body of the tag for each class.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException

UNKNOWN: type = "block"

formName

public String formName(Properties attributes)
Gets the "name" attribute for the <form> element in the xml descriptor. This should be the "path" form attribute if this is a ValidatorActiorForm or the "name" attribute otherwise.

Parameters: attributes The content tag attributes.

Returns: form name

Throws: XDocletException if anything goes awry.

UNKNOWN: type = "content"

getFields

protected Map getFields(XClass clazz)

getFields

protected Map getFields(XClass clazz, String prefix)

ifArgIsForType

public void ifArgIsForType(String template, Properties attributes)
Evaluates the body if the current argument is a validator-specific argument.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException

UNKNOWN: type = "block"

ifArgIsResource

public void ifArgIsResource(String template, Properties attributes)
Evaluates body if current argument is a resource key.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException

UNKNOWN: type = "block"

ifArgIsValue

public void ifArgIsValue(String template, Properties attributes)
Evaluates the body if the current argument is an inline value rather than a resource key.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException

UNKNOWN: type = "block"

ifFieldIsIndexed

public void ifFieldIsIndexed(String template, Properties attributes)
Evaluates the body if the current field has an indexed component.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException

UNKNOWN: type = "block"

ifFormHasFields

public void ifFormHasFields(String template, Properties attributes)
Evaluates the body if form has fields requiring validation.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException

UNKNOWN: type = "block"

ifNoArg0

public void ifNoArg0(String template, Properties attributes)
Evaluates the body if there is no arg0 specified.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException

UNKNOWN: type = "block"

indexedListProperty

public String indexedListProperty(Properties props)
Returns the current field's indexedListProperty attribute, if any.

Parameters: props The content tag attributes.

Returns: current field's indexedListProperty

UNKNOWN: type = "content"

loadFieldArguments

protected void loadFieldArguments()

validatorList

public String validatorList(Properties props)
Returns a comma-separated list of the specified validator types.

Parameters: props The content tag attributes.

Returns: validator types list

UNKNOWN: type = "content"