water
Class Request2.TypeaheadKey
java.lang.Object
water.Iced
water.api.RequestArguments.Argument<T>
water.api.RequestArguments.InputText<T>
water.api.RequestArguments.TypeaheadInputText<Key>
water.Request2.TypeaheadKey
- All Implemented Interfaces:
- java.lang.Cloneable, Request.Filter, Freezable
- Enclosing class:
- Request2
public class Request2.TypeaheadKey
- extends RequestArguments.TypeaheadInputText<Key>
Method Summary |
protected Key |
defaultValue()
Returns the default value of the argument. |
protected java.lang.String[] |
errors()
Returns a list of possible error strings, that could be thrown in an
IllegalArgumentException. |
protected Key |
parse(java.lang.String input)
Override this method to provide parsing of the input string to the Java
expected value. |
protected java.lang.String |
queryDescription()
Returns the query description. |
void |
setValue(Key key)
|
Methods inherited from class water.api.RequestArguments.Argument |
addPrerequisite, check, disable, disable, disabled, originalValue, query, queryAddons, queryComment, record, refreshOnChange, requestHelp, reset, run, setRefreshOnChange, specified, valid, value |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Request2.TypeaheadKey
public Request2.TypeaheadKey()
Request2.TypeaheadKey
public Request2.TypeaheadKey(java.lang.Class type,
boolean required)
setValue
public void setValue(Key key)
parse
protected Key parse(java.lang.String input)
- Description copied from class:
RequestArguments.Argument
- Override this method to provide parsing of the input string to the Java
expected value. The input is guaranteed to be non-empty when this method
is called and all prerequisities are guaranteed to be valid before this
method is called.
- Specified by:
parse
in class RequestArguments.Argument<Key>
defaultValue
protected Key defaultValue()
- Description copied from class:
RequestArguments.Argument
- Returns the default value of the argument. Note that the method will be
called also on required arguments, in which case it is ok return null.
It is kept abstract because defining a proper default value might be
tricky and in many case you do not want it to be null. Overriding it
always makes you think:)
- Specified by:
defaultValue
in class RequestArguments.Argument<Key>
queryDescription
protected java.lang.String queryDescription()
- Description copied from class:
RequestArguments.Argument
- Returns the query description. This is a concise description of a
correct value for the argument. generally used as a placeholder in the
html query elements.
- Specified by:
queryDescription
in class RequestArguments.Argument<Key>
errors
protected java.lang.String[] errors()
- Description copied from class:
RequestArguments.Argument
- Returns a list of possible error strings, that could be thrown in an
IllegalArgumentException.
- Overrides:
errors
in class RequestArguments.Argument<Key>