Class InputDescriptor.TextInputBuilder
java.lang.Object
se.conciliate.extensions.documents.InputDescriptor.TextInputBuilder
- Enclosing class:
- InputDescriptor<T extends MetaData>
-
Field Summary
Fields -
Method Summary
-
Field Details
-
descriptor
-
-
Method Details
-
maxLength
Sets the maximum length (number of characters) of the text value.- Parameters:
maxLength
- The maximum length- Returns:
- this TextInputBuilder to chain builder calls.
-
labeled
Sets the labeled property. True means that the text will be rendered without a border on the same "row" as the label for the text value and without a background. This means that the rendering will be similar to that of a label rather than a text field. It will still be possible to select (and therefore copy) the text value (which would not be possible with a "true" label). A false value of isLabel means that the text will be rendered as a normal text field.
NOTE: If the text value is editable this property will have no effect since it would be unintuitive to have an editable text field be rendered as a label-look-a-like.- Parameters:
isLabel
- true or false, see method description.- Returns:
- this TextInputBuilder to chain builder calls.
-
validator
Puts a validator on the descriptor. The validator will be called on some arbitrary non-ui thread and must therefore be thread safe. The validator takes a string to validate. The validator returns:-
ValidationResult.success()
if validation succeeds -
ValidationResult.error(String)
if validation fails and is binding (data cannot be saved) -
ValidationResult.success()
if validation fails and is non-binding (data can be saved)
- Parameters:
validator
- A validator or null to use no validator.- Returns:
- This builder for chaining.
-
-
build
-