Package com.slack.api.model.dialog
Class DialogSelectElement
java.lang.Object
com.slack.api.model.dialog.DialogSelectElement
- All Implemented Interfaces:
DialogElement
Represents a select
dialog element
Use the select element for multiple choice selections allowing users to pick a
single item from a list. True to web roots, this selection is displayed as a dropdown
menu.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDialogSelectElement(String label, String name, String value, String placeholder, boolean optional, List<DialogOption> options, List<DialogOption> selectedOptions, List<DialogOptionGroup> optionGroups, Integer minQueryLength, DialogDataSourceType dataSource) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()protected booleanbooleanProvide the data source type for the Element.getLabel()Label displayed to user.Provide the number of characters that must be typed by a user.getName()Name of form element.Provide up to 100 option group element attributes.Provide up to 100 option element attributes.A string displayed as needed to help guide users in completing the element.Provide a default selected value for dynamic select menus with a data_source of type external.getType()Type of element.getValue()A default value for this field.inthashCode()booleanProvide true when the form element is not required.voidsetDataSource(DialogDataSourceType dataSource) Provide the data source type for the Element.voidLabel displayed to user.voidsetMinQueryLength(Integer minQueryLength) Provide the number of characters that must be typed by a user.voidName of form element.voidsetOptional(boolean optional) Provide true when the form element is not required.voidsetOptionGroups(List<DialogOptionGroup> optionGroups) Provide up to 100 option group element attributes.voidsetOptions(List<DialogOption> options) Provide up to 100 option element attributes.voidsetPlaceholder(String placeholder) A string displayed as needed to help guide users in completing the element.voidsetSelectedOptions(List<DialogOption> selectedOptions) Provide a default selected value for dynamic select menus with a data_source of type external.voidA default value for this field.toString()
-
Constructor Details
-
DialogSelectElement
public DialogSelectElement() -
DialogSelectElement
public DialogSelectElement(String label, String name, String value, String placeholder, boolean optional, List<DialogOption> options, List<DialogOption> selectedOptions, List<DialogOptionGroup> optionGroups, Integer minQueryLength, DialogDataSourceType dataSource)
-
-
Method Details
-
builder
-
getLabel
Label displayed to user. Required. No more than 24 characters.- Specified by:
getLabelin interfaceDialogElement
-
getName
Name of form element. Required. No more than 300 characters.- Specified by:
getNamein interfaceDialogElement
-
getType
Type of element. For a dropdown (select), the type is alwaysselect. It's required.- Specified by:
getTypein interfaceDialogElement- See Also:
-
getValue
A default value for this field. Must match a value presented inDialogOptions.- Specified by:
getValuein interfaceDialogElement
-
getPlaceholder
A string displayed as needed to help guide users in completing the element. 150 character maximum.- Specified by:
getPlaceholderin interfaceDialogElement
-
isOptional
public boolean isOptional()Provide true when the form element is not required. By default, form elements are required.- Specified by:
isOptionalin interfaceDialogElement
-
getOptions
Provide up to 100 option element attributes. Either options or option_groups is required for the static and external. -
getSelectedOptions
Provide a default selected value for dynamic select menus with a data_source of type external. -
getOptionGroups
Provide up to 100 option group element attributes. Either options or option_groups is required for the static and external. -
getMinQueryLength
Provide the number of characters that must be typed by a user. -
getDataSource
Provide the data source type for the Element. -
setLabel
Label displayed to user. Required. No more than 24 characters.- Specified by:
setLabelin interfaceDialogElement
-
setName
Name of form element. Required. No more than 300 characters.- Specified by:
setNamein interfaceDialogElement
-
setValue
A default value for this field. Must match a value presented inDialogOptions.- Specified by:
setValuein interfaceDialogElement
-
setPlaceholder
A string displayed as needed to help guide users in completing the element. 150 character maximum.- Specified by:
setPlaceholderin interfaceDialogElement
-
setOptional
public void setOptional(boolean optional) Provide true when the form element is not required. By default, form elements are required.- Specified by:
setOptionalin interfaceDialogElement
-
setOptions
Provide up to 100 option element attributes. Either options or option_groups is required for the static and external. -
setSelectedOptions
Provide a default selected value for dynamic select menus with a data_source of type external. -
setOptionGroups
Provide up to 100 option group element attributes. Either options or option_groups is required for the static and external. -
setMinQueryLength
Provide the number of characters that must be typed by a user. -
setDataSource
Provide the data source type for the Element. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-