public static class AutocompleteHelper.Completion extends Object
Constructor and Description |
---|
Completion(String value)
Generates a new suggestion
|
Completion(String value,
String label)
Generates a new suggestion
|
Completion(String value,
String label,
String description)
Generates a new suggestion
|
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Returns the description of the suggestion
|
String |
getLabel()
Returns the label shown to the user
|
String |
getValue()
Returns the effective value of the suggestion
|
AutocompleteHelper.Completion |
setDescription(String description)
Sets the description for the suggestion
|
AutocompleteHelper.Completion |
setDisabled(boolean disabled)
Sets if the suggestion should be disabled
Uses standard select2 functionality to have entries in the select, that can't be selected.
|
AutocompleteHelper.Completion |
setLabel(String label)
Sets the label for the suggestion
|
AutocompleteHelper.Completion |
setValue(String value)
Sets the value for the suggestion
|
public Completion(String value)
value
- the effective value to fill into the fieldpublic Completion(String value, String label)
value
- the effective value to fill into the fieldlabel
- the text to display to the userpublic AutocompleteHelper.Completion setLabel(String label)
label
- the label shown to the userpublic AutocompleteHelper.Completion setValue(String value)
value
- the value used in the entry fieldpublic String getValue()
public String getLabel()
public String getDescription()
public AutocompleteHelper.Completion setDescription(String description)
description
- the description to show to the userpublic AutocompleteHelper.Completion setDisabled(boolean disabled)
Uses standard select2 functionality to have entries in the select, that can't be selected.
disabled
- true if the suggestion is disabled, false otherwiseCopyright © 2018. All rights reserved.