01: package org.jreform;
02:
03: /**
04: * Defines an input control in an html form.
05: *
06: * @author armandino (at) gmail.com
07: * @param <T> data type of this input.
08: */
09: public interface InputControl<T> extends MessageOnError {
10: /**
11: * Returns this input's data type.
12: */
13: public InputDataType<T> getType();
14:
15: /**
16: * Returns this input's <tt>name</tt> attribute.
17: */
18: public String getInputName();
19:
20: /**
21: * Returns <code>true</code> if this input must have a value.
22: */
23: public boolean isRequired();
24:
25: /**
26: * Returns <code>true</code> if this input's data is valid.
27: */
28: public boolean isValid();
29:
30: /**
31: * Returns <code>true</code> if the input has no value.
32: */
33: public boolean isBlank();
34:
35: /**
36: * Returns a string representation of this input's value
37: * as returned by the {@link #toString()} method.
38: */
39: public String getStringValue();
40:
41: }
|