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


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

A validation rule that will fail if it is applied to a property that has a non-empty value which is not a number within a given range. Used within Jpf.ValidatableProperty and Jpf.ValidationLocaleRules.


Optional Element Summary
 String bundleName
          The name of the message bundle in which to look up the error message.
 boolean enabled
          If set to false, then this rule will not be applied.
 double maxFloat
          The maximum floating-point value; requires minFloat(), and mutually-exclusive with maxInt().
 long maxInt
          The maximum integer value; requires minInt(), and mutually-exclusive with maxFloat().
 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.
 double minFloat
          The minimum floating-point value; requires maxFloat(), and mutually-exclusive with minInt().
 long minInt
          The minimum integer value; requires maxInt(), and mutually-exclusive with minFloat().
 

enabled

public abstract boolean enabled
If set to false, then this rule will not be applied.

Default:
true

minInt

public abstract long minInt
The minimum integer value; requires maxInt(), and mutually-exclusive with minFloat().

Default:
0L

maxInt

public abstract long maxInt
The maximum integer value; requires minInt(), and mutually-exclusive with maxFloat().

Default:
-1L

minFloat

public abstract double minFloat
The minimum floating-point value; requires maxFloat(), and mutually-exclusive with minInt().

Default:
0.0

maxFloat

public abstract double maxFloat
The maximum floating-point value; requires minFloat(), and mutually-exclusive with maxInt().

Default:
-1.0

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:
{}