public class StrutsValidatorTagsHandler
extends xdoclet.tagshandler.AbstractProgramElementTagsHandler
argIndex
public String argIndex(Properties props)
Current argument index number (0 to 3).
props
- The content tag attributes.
argName
public String argName(Properties props)
Current argument name - only valid if argument is for a specific validator type.
props
- The content tag attributes.
argValue
public String argValue(Properties props)
Current argument value, which is either an inline value or resource key.
props
- The content tag attributes.
fieldName
public String fieldName(Properties props)
Returns the current field's name, local to the indexed property if there is one.
props
- The content tag attributes.
forAllFieldArgs
public void forAllFieldArgs(String template,
Properties attributes)
throws xdoclet.XDocletException
Iterates over all arguments for the current field.
template
- The body of the block tagattributes
- The attributes of the template tag
xdoclet.XDocletException
-
forAllFields
public void forAllFields(String template,
Properties attributes)
throws xdoclet.XDocletException
Iterates the body for each field of the current form requiring validation.
template
- The body of the block tagattributes
- The attributes of the template tag
xdoclet.XDocletException
-
forAllForms
public void forAllForms(String template,
Properties attributes)
throws xdoclet.XDocletException
Iterates over all Struts Form beans and evaluates the body of the tag for each class.
template
- The body of the block tagattributes
- The attributes of the template tag
xdoclet.XDocletException
-
formName
public String formName(Properties attributes)
throws xdoclet.XDocletException
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.
attributes
- The content tag attributes.
xdoclet.XDocletException
- if anything goes awry.
getFields
protected Map getFields(XClass clazz)
throws xdoclet.XDocletException
getFields
protected Map getFields(XClass clazz,
String prefix)
throws xdoclet.XDocletException
ifArgIsForType
public void ifArgIsForType(String template,
Properties attributes)
throws xdoclet.XDocletException
Evaluates the body if the current argument is a validator-specific argument.
template
- The body of the block tagattributes
- The attributes of the template tag
xdoclet.XDocletException
-
ifArgIsResource
public void ifArgIsResource(String template,
Properties attributes)
throws xdoclet.XDocletException
Evaluates body if current argument is a resource key.
template
- The body of the block tagattributes
- The attributes of the template tag
xdoclet.XDocletException
-
ifArgIsValue
public void ifArgIsValue(String template,
Properties attributes)
throws xdoclet.XDocletException
Evaluates the body if the current argument is an inline value rather than a resource key.
template
- The body of the block tagattributes
- The attributes of the template tag
xdoclet.XDocletException
-
ifFieldIsIndexed
public void ifFieldIsIndexed(String template,
Properties attributes)
throws xdoclet.XDocletException
Evaluates the body if the current field has an indexed component.
template
- The body of the block tagattributes
- The attributes of the template tag
xdoclet.XDocletException
-
ifFormHasFields
public void ifFormHasFields(String template,
Properties attributes)
throws xdoclet.XDocletException
Evaluates the body if form has fields requiring validation.
template
- The body of the block tagattributes
- The attributes of the template tag
xdoclet.XDocletException
-
ifNoArg0
public void ifNoArg0(String template,
Properties attributes)
throws xdoclet.XDocletException
Evaluates the body if there is no arg0 specified.
template
- The body of the block tagattributes
- The attributes of the template tag
xdoclet.XDocletException
-
indexedListProperty
public String indexedListProperty(Properties props)
Returns the current field's indexedListProperty attribute, if any.
props
- The content tag attributes.
- current field's indexedListProperty
loadFieldArguments
protected void loadFieldArguments()
validatorList
public String validatorList(Properties props)
Returns a comma-separated list of the specified validator types.
props
- The content tag attributes.