org.apache.beehive.netui.pageflow.annotations
Annotation Type Jpf.ValidateCustomRule


@Target(value=ANNOTATION_TYPE)
@Retention(value=RUNTIME)
public static @interface Jpf.ValidateCustomRule

A validation rule that will fail when a given custom ValidatorPlugIn rule fails. Used within Jpf.ValidatableProperty and Jpf.ValidationLocaleRules.


Required Element Summary
 String rule
          The name of the custom rule to run.
 
Optional Element Summary
 String bundleName
          The name of the message bundle in which to look up the error message.
 String message
          The JSP 2.0-style expression (e.g., ${pageFlow.myProperty}) or literal string that will be used as the error message.
 Jpf.MessageArg[] messageArgs
          An array of message arguments, which will be used for the message obtained from message() or messageKey(), whichever is specified.
 String messageKey
          A key in the default message bundle or in the bundle specified by bundleName() that will be used to look up the error message.
 Jpf.ValidateCustomVariable[] variables
          An array of variables that will be passed to the custom rule.
 

Element Detail

rule

public abstract String rule
The name of the custom rule to run. This rule may be specified in a ValidatorPlugIn config that is declared with Jpf.Controller.customValidatorConfigs().

variables

public abstract Jpf.ValidateCustomVariable[] variables
An array of variables that will be passed to the custom rule.

Default:
{}

message

public abstract String message
The JSP 2.0-style expression (e.g., ${pageFlow.myProperty}) or literal string that will be used as the error message. Mutually-exclusive with messageKey().

Default:
""

messageKey

public abstract String messageKey
A key in the default message bundle or in the bundle specified by bundleName() that will be used to look up the error message. Mutually-exclusive with message().

See Also:
Jpf.MessageBundle
Default:
""

bundleName

public abstract String bundleName
The name of the message bundle in which to look up the error message. Requires messageKey() to be set.

See Also:
Jpf.MessageBundle
Default:
""

messageArgs

public abstract Jpf.MessageArg[] messageArgs
An array of message arguments, which will be used for the message obtained from message() or messageKey(), whichever is specified.

Default:
{}