Package io.jmix.ui.action.valuespicker
Class ValuesSelectAction<V>
java.lang.Object
io.jmix.ui.action.AbstractAction
io.jmix.ui.action.BaseAction
io.jmix.ui.action.valuespicker.ValuesSelectAction<V>
- All Implemented Interfaces:
- Action,- Action.ExecutableAction,- Action.HasPrimaryState,- Action.SecuredAction,- ValuePicker.ValuePickerAction,- org.springframework.beans.factory.InitializingBean
@StudioAction(target="io.jmix.ui.component.ValuesPicker",
              description="Sets a value to the values picker using the selection screen")
@ActionType("values_select")
public class ValuesSelectAction<V>
extends BaseAction
implements ValuePicker.ValuePickerAction, org.springframework.beans.factory.InitializingBean, Action.ExecutableAction
Standard values picker action for selection the field value.
 
 Should be defined for ValuesPicker or its subclass in a screen XML descriptor.
- 
Nested Class SummaryNested classes/interfaces inherited from class io.jmix.ui.action.BaseActionBaseAction.EnabledRuleNested classes/interfaces inherited from interface io.jmix.ui.action.ActionAction.ActionPerformedEvent, Action.AdjustWhenScreenReadOnly, Action.ExecutableAction, Action.HasPrimaryState, Action.HasSecurityConstraint, Action.HasTarget, Action.MainTabSheetAction, Action.ScreenOpeningAction, Action.SecuredAction, Action.Status
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected UiComponentPropertiesstatic final Stringprotected booleanprotected Iconsstatic final Stringprotected Messagesprotected ScreenBuildersprotected ActionScreenInitializerprotected SelectValueController.SelectValueContext<V>protected ValuesPicker<V>Fields inherited from class io.jmix.ui.action.AbstractActioncaption, description, enabled, eventHub, icon, id, owners, primary, shortcut, visibleFields inherited from interface io.jmix.ui.action.ActionPROP_CAPTION, PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_VISIBLEFields inherited from interface io.jmix.ui.component.ValuePicker.ValuePickerActionPROP_EDITABLE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidactionPerform(Component component) Invoked by owning component to execute the action.voidaddValidator(Validator<V> validator) Adds validator which is used inSelectValueControllerscreen to validate component values.voidvoideditableChanged(boolean editable) Called byValuePickerto inform about its editable state.voidexecute()Executes the action.Class<?>Returns the class ofSelectValueControllerscreen if it was set bysetSelectValueScreenId(String)or in the screen XML.Returns the id ofSelectValueControllerscreen if it was set bysetSelectValueScreenId(String)or in the screen XML.protected voidinitSelectValueComponentValueType(EntityValueSource<?, ?> valueSource) booleanbooleanprotected voidsetEditable(boolean editable) voidsetEntityName(String entityName) Sets the entity name which is used as the component value type inSelectValueControllerscreen.voidsetEnumClass(Class<? extends Enum> enumClass) Sets the enumeration class which is used as the component value type inSelectValueControllerscreen.protected voidvoidsetJavaClass(Class<?> javaClass) Sets the java class which is used as the component value type inSelectValueControllerscreen.voidsetLookupScreenId(String lookupScreenId) Sets the lookup screen id to be passed intoSelectValueControllerscreen.protected voidsetMessages(Messages messages) voidsetOptionCaptionProvider(Function<V, String> optionCaptionProvider) Sets function that provides caption for option items.voidsetOptions(Options<V> options) Sets options which are used inSelectValueControllerscreen.voidsetPicker(ValuePicker valuePicker) Sets aValuePickerinstance associated with this action.voidsetResolution(DateField.Resolution resolution) Sets the resolution ofDateFieldcomponent.voidsetScreenBuilders(ScreenBuilders screenBuilders) voidsetSelectValueScreenClass(Class selectValueScreenClass) Sets the class ofSelectValueControllerscreen.voidsetSelectValueScreenId(String selectValueScreenId) Sets the id ofSelectValueControllerscreen.voidsetTimeZone(TimeZone timeZone) Sets the time zone ofDateFieldcomponent.protected voidsetUiComponentProperties(UiComponentProperties componentProperties) voidsetUseComboBox(boolean useComboBox) Sets whether theComboBoxshould be used inSelectValueControllerscreen.voidsetValidators(List<Validator<V>> validators) Sets the collection ofValidator's which are used inSelectValueControllerscreen to validate component values.Methods inherited from class io.jmix.ui.action.BaseActionaddActionPerformedListener, addEnabledRule, isApplicable, isEnabledByRule, isEnabledByUiPermissions, isPermitted, isVisibleByUiPermissions, refreshState, removeEnabledRule, setEnabled, setEnabledByUiPermissions, setEnabledInternal, setVisible, setVisibleByUiPermissions, setVisibleInternal, withCaption, withDescription, withHandler, withIcon, withPrimary, withShortcutMethods inherited from class io.jmix.ui.action.AbstractActionaddOwner, addPropertyChangeListener, firePropertyChange, getCaption, getDescription, getEventHub, getIcon, getId, getOwner, getOwners, getShortcutCombination, hasSubscriptions, isEnabled, isPrimary, isVisible, removeOwner, removePropertyChangeListener, setCaption, setDescription, setIcon, setPrimary, setShortcut, setShortcutCombinationMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.ui.action.ActionaddOwner, addPropertyChangeListener, getCaption, getDescription, getIcon, getId, getOwner, getOwners, getShortcutCombination, isEnabled, isVisible, refreshState, removeOwner, removePropertyChangeListener, setCaption, setDescription, setEnabled, setIcon, setShortcut, setShortcutCombination, setVisible
- 
Field Details- 
ID- See Also:
 
- 
DEFAULT_SELECT_VALUE_SCREEN- See Also:
 
- 
valuesPicker
- 
icons
- 
messages
- 
componentProperties
- 
screenBuilders
- 
editableprotected boolean editable
- 
screenInitializer
- 
selectValueContext
 
- 
- 
Constructor Details- 
ValuesSelectActionpublic ValuesSelectAction()
- 
ValuesSelectAction
 
- 
- 
Method Details- 
setUiComponentProperties
- 
setMessages
- 
setScreenBuilders
- 
setIcons
- 
afterPropertiesSetpublic void afterPropertiesSet()- Specified by:
- afterPropertiesSetin interface- org.springframework.beans.factory.InitializingBean
 
- 
setPickerDescription copied from interface:ValuePicker.ValuePickerActionSets aValuePickerinstance associated with this action.- Specified by:
- setPickerin interface- ValuePicker.ValuePickerAction
- Parameters:
- valuePicker- a- ValuePickerinstance to set
 
- 
editableChangedpublic void editableChanged(boolean editable) Description copied from interface:ValuePicker.ValuePickerActionCalled byValuePickerto inform about its editable state.- Specified by:
- editableChangedin interface- ValuePicker.ValuePickerAction
- Parameters:
- editable- a- ValuePickereditable state
 
- 
isEditablepublic boolean isEditable()- Specified by:
- isEditablein interface- ValuePicker.ValuePickerAction
- Returns:
- whether this action is editable
 
- 
setEditableprotected void setEditable(boolean editable) 
- 
getSelectValueScreenIdReturns the id ofSelectValueControllerscreen if it was set bysetSelectValueScreenId(String)or in the screen XML.- Returns:
- the id of SelectValueControllerscreen
 
- 
setSelectValueScreenId@StudioPropertiesItem(type=SCREEN_ID, defaultValue="selectValueDialog", options="io.jmix.ui.app.valuespicker.selectvalue.SelectValueController") public void setSelectValueScreenId(String selectValueScreenId) Sets the id ofSelectValueControllerscreen.- Parameters:
- selectValueScreenId- the id of- SelectValueControllerscreen
 
- 
getSelectValueScreenClassReturns the class ofSelectValueControllerscreen if it was set bysetSelectValueScreenId(String)or in the screen XML. Otherwise returnsnull.- Returns:
- the class of SelectValueControllerscreen
 
- 
setSelectValueScreenClassSets the class ofSelectValueControllerscreen.- Parameters:
- selectValueScreenClass- the class of- SelectValueControllerscreen
 
- 
getLookupScreenId- Returns:
- the lookup screen id
 
- 
setLookupScreenId@StudioPropertiesItem(type=SCREEN_ID, options="io.jmix.ui.screen.LookupScreen") public void setLookupScreenId(@Nullable String lookupScreenId) Sets the lookup screen id to be passed intoSelectValueControllerscreen.- Parameters:
- lookupScreenId- the lookup screen id
 
- 
getEntityName- Returns:
- the entity name which is used as the component value type
 
- 
setEntityNameSets the entity name which is used as the component value type inSelectValueControllerscreen.- Parameters:
- entityName- the entity name which is used as the component value type
 
- 
getJavaClass- Returns:
- the java class which is used as the component value type
 
- 
setJavaClassSets the java class which is used as the component value type inSelectValueControllerscreen.- Parameters:
- javaClass- the java class which is used as the component value type
 
- 
getEnumClass- Returns:
- the enumeration class which is used as the component value type
 
- 
setEnumClass@StudioPropertiesItem(type=JAVA_CLASS_NAME) public void setEnumClass(@Nullable Class<? extends Enum> enumClass) Sets the enumeration class which is used as the component value type inSelectValueControllerscreen.- Parameters:
- enumClass- the enumeration class which is used as the component value type
 
- 
isUseComboBoxpublic boolean isUseComboBox()- Returns:
- whether or not the ComboBoxshould be used inSelectValueControllerscreen
 
- 
setUseComboBox@StudioPropertiesItem(type=BOOLEAN, defaultValue="false") public void setUseComboBox(boolean useComboBox) Sets whether theComboBoxshould be used inSelectValueControllerscreen.- Parameters:
- useComboBox- whether the- ComboBoxshould be used in- SelectValueControllerscreen
 
- 
getResolution- Returns:
- the resolution of DateField
 
- 
setResolution@StudioPropertiesItem(type=ENUMERATION) public void setResolution(@Nullable DateField.Resolution resolution) Sets the resolution ofDateFieldcomponent. TheDateFieldcomponent is used to select values which have date value type. The component is used inSelectValueControllerscreen.- Parameters:
- resolution- the resolution of- DateField
 
- 
getTimeZone- Returns:
- the time zone of DateField
 
- 
setTimeZoneSets the time zone ofDateFieldcomponent. TheDateFieldcomponent is used to select values which have date value type. The component is used inSelectValueControllerscreen.- Parameters:
- timeZone- the time zone of- DateField
 
- 
getOptions- Returns:
- options
 
- 
setOptionsSets options which are used inSelectValueControllerscreen.- Parameters:
- options- options
 
- 
getOptionCaptionProvider- Returns:
- caption provider for options
 
- 
setOptionCaptionProviderSets function that provides caption for option items.- Parameters:
- optionCaptionProvider- caption provider for options
 
- 
getValidators- Returns:
- the collection of validators
 
- 
setValidatorsSets the collection ofValidator's which are used inSelectValueControllerscreen to validate component values.- Parameters:
- validators- the collection of validators
 
- 
addValidatorAdds validator which is used inSelectValueControllerscreen to validate component values.- Parameters:
- validator- validator
 
- 
actionPerformDescription copied from interface:ActionInvoked by owning component to execute the action.- Specified by:
- actionPerformin interface- Action
- Overrides:
- actionPerformin class- BaseAction
- Parameters:
- component- invoking component
 
- 
executepublic void execute()Executes the action.- Specified by:
- executein interface- Action.ExecutableAction
 
- 
initSelectValueComponentValueType
 
-