-
@Serializable() public final class Select
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringidprivate final SelectTypetypeprivate final List<SelectOption>optionsprivate final List<String>defaultprivate final UserAttributeuserAttributeprivate final IntegermaxSelectableprivate final BooleanvalidateOnSelection
-
Constructor Summary
Constructors Constructor Description Select(String id, SelectType type, List<SelectOption> options, List<String> default, UserAttribute userAttribute, Integer maxSelectable, Boolean validateOnSelection)
-
Method Summary
Modifier and Type Method Description final StringgetId()final SelectTypegetType()final List<SelectOption>getOptions()final List<String>getDefault()final UserAttributegetUserAttribute()final IntegergetMaxSelectable()final BooleangetValidateOnSelection()-
-
Constructor Detail
-
Select
Select(String id, SelectType type, List<SelectOption> options, List<String> default, UserAttribute userAttribute, Integer maxSelectable, Boolean validateOnSelection)
-
-
Method Detail
-
getId
final String getId()
Example id:"distraction", type: "multiple", options: { id: "social_media" value: "social_media" }, { id: "news" value: "news" }, { id: "gaming" value: "gaming" } , user_attribute: { key: "distraction", type: "String" }, min_selectable:1, // si le nombre d'options sélectionnées < min_selectable => le CTA de validation est à l'état disabled max_selectable:3 // lors de la sélection d'une option, si le nombre d'options sélection = max_selectable => on ne peut pas la sélectionner
-
getType
final SelectType getType()
-
getOptions
final List<SelectOption> getOptions()
-
getDefault
final List<String> getDefault()
-
getUserAttribute
final UserAttribute getUserAttribute()
-
getMaxSelectable
final Integer getMaxSelectable()
-
getValidateOnSelection
final Boolean getValidateOnSelection()
-
-
-
-