java.lang.Object | ||
↳ | com.salesforce.android.chat.core.model.ChatUserData | |
↳ | com.salesforce.android.chat.ui.model.PreChatPickListField |
A pre-chat field used to present pick list options to the user. PickList fields can be created via
PreChatPickListField.Builder
and provided to
chatUserData(ChatUserData)
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | PreChatPickListField.Builder | Used to construct PreChatPickListField objects for presenting pick list options to the
user during pre-chat. |
|||||||||
class | PreChatPickListField.Option | A pick list option that can be used with PreChatPickListField and displayed on the
pre-chat UI. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
deselect()
Clear the assigned
PreChatPickListField.Option . | ||||||||||
final String |
getDisplayLabel()
The field label that will be displayed to the user on the pre-chat UI.
| ||||||||||
List<PreChatPickListField.Option> |
getOptions()
Return the list of
PreChatPickListField.Option s in the same order as they were provided to
addOption(Option) . | ||||||||||
PreChatPickListField.Option |
getSelectedOption()
Return the selected
PreChatPickListField.Option - May be null. | ||||||||||
int |
getSelectedOptionIndex()
Return the index of the selected
PreChatPickListField.Option corresponding to the order that option was
provided to addOption(Option) . | ||||||||||
final boolean |
hasValue()
Whether or not a value has been assigned to this field.
| ||||||||||
boolean |
isOptionSelected()
Whether or not an option has been selected.
| ||||||||||
final boolean |
isReadOnly()
Whether or not the value of this field can be modified.
| ||||||||||
final boolean |
isRequired()
Whether or not this field is required to have a value before the pre-chat form can be submitted.
| ||||||||||
boolean |
isSatisfied()
Returns true if the validation conditions for this field are met and the pre-chat form can be
submitted.
| ||||||||||
void |
setValue(Object value)
Assign a value to this field.
| ||||||||||
void |
setValue(PreChatPickListField.Option selectedOption)
Assign a
PreChatPickListField.Option value to this field - Null will clear the assigned
value. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.salesforce.android.chat.core.model.ChatUserData
| |||||||||||
From class
java.lang.Object
|
The field label that will be displayed to the user on the pre-chat UI.
Return the list of PreChatPickListField.Option
s in the same order as they were provided to
addOption(Option)
.
Return the selected PreChatPickListField.Option
- May be null.
Return the index of the selected PreChatPickListField.Option
corresponding to the order that option was
provided to addOption(Option)
. A value of -1 will be
returned if there is no selected option.
Whether or not a value has been assigned to this field.
Whether or not an option has been selected.
Whether or not the value of this field can be modified.
Whether or not this field is required to have a value before the pre-chat form can be submitted.
Returns true if the validation conditions for this field are met and the pre-chat form can be
submitted. Fields are satisfied by default, but a required field is considered satisfied once a
value has been assigned with setValue(Object)
.
Assign a value to this field. Values are ignored if they are not an instance of
PreChatPickListField.Option
. Value must be present in the list of available options,
by passing it to addOption(Option)
. Null will clear the
assigned value.
Assign a PreChatPickListField.Option
value to this field - Null will clear the assigned
value. Value must be present in the list of available options, by passing it to
addOption(Option)
.