V
- value typeT
- item typepublic class OptionalListInputWrapper<V,T> extends ListInputWrapper<V,T> implements OptionalListInput<V,T>
ListInput
into a OptionalListInput
returning null on not selected.
This also allows the un-selected text to be customised.Constructor and Description |
---|
OptionalListInputWrapper(ListInput<V,T> inner) |
OptionalListInputWrapper(ListInput<V,T> inner,
java.lang.String text) |
Modifier and Type | Method and Description |
---|---|
V |
convert(java.lang.Object v)
Perform any supported type conversions to to generate a value of the
target type
|
java.lang.String |
getText(T item)
get the user presented text from the domain object
may return null if not selected
|
java.lang.String |
getUnselectedText() |
void |
setUnselectedText(java.lang.String text) |
accept, getCount, getInner, getItem, getItembyValue, getItems, getTagByItem, getTagByValue, isValid, setItem
addValidator, getKey, getNested, getPrettyString, getString, getValue, removeValidator, setKey, setValue, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTagByItem, getTagByValue, isValid
getCount, getItems
getItem, getItembyValue, setItem
accept, addValidator, getKey, getPrettyString, getString, getValue, isEmpty, removeValidator, setKey, setValue, validate
public java.lang.String getText(T item)
ListInput
public V convert(java.lang.Object v) throws TypeError
Input
public java.lang.String getUnselectedText()
getUnselectedText
in interface OptionalListInput<V,T>
public void setUnselectedText(java.lang.String text)
setUnselectedText
in interface OptionalListInput<V,T>