Package io.jmix.searchflowui.component
Class SearchField
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<com.vaadin.flow.component.customfield.CustomField<T>,T>
com.vaadin.flow.component.customfield.CustomField<String>
io.jmix.searchflowui.component.SearchField
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.customfield.CustomField<String>>
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.Focusable<com.vaadin.flow.component.customfield.CustomField<String>>
,com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.customfield.CustomField<String>>
,com.vaadin.flow.component.HasAriaLabel
,com.vaadin.flow.component.HasElement
,com.vaadin.flow.component.HasEnabled
,com.vaadin.flow.component.HasHelper
,com.vaadin.flow.component.HasLabel
,com.vaadin.flow.component.HasPlaceholder
,com.vaadin.flow.component.HasSize
,com.vaadin.flow.component.HasStyle
,com.vaadin.flow.component.HasTheme
,com.vaadin.flow.component.HasValidation
,com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<String>,
,String>, String> com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<String>,
,String>, String> com.vaadin.flow.component.InputNotifier
,com.vaadin.flow.component.KeyNotifier
,com.vaadin.flow.component.shared.HasSuffix
,com.vaadin.flow.component.shared.HasThemeVariant<com.vaadin.flow.component.textfield.TextFieldVariant>
,com.vaadin.flow.component.shared.HasTooltip
,com.vaadin.flow.component.shared.HasValidationProperties
,com.vaadin.flow.component.shared.InputField<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<String>,
,String>, String> HasAutofocus
,HasTitle
,Serializable
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
public class SearchField
extends com.vaadin.flow.component.customfield.CustomField<String>
implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean, com.vaadin.flow.component.HasHelper, com.vaadin.flow.component.HasLabel, com.vaadin.flow.component.shared.HasSuffix, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.shared.HasTooltip, com.vaadin.flow.component.shared.HasThemeVariant<com.vaadin.flow.component.textfield.TextFieldVariant>, HasTitle, com.vaadin.flow.component.InputNotifier, com.vaadin.flow.component.KeyNotifier, com.vaadin.flow.component.HasAriaLabel, HasAutofocus, com.vaadin.flow.component.HasPlaceholder
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.AbstractField
com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,
V extends Object> Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>
Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>
Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue
com.vaadin.flow.component.HasValue.ValueChangeEvent<V extends Object>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>>
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
protected Dialogs
protected DialogWindows
protected EntitySearcher
protected Messages
protected Notifications
protected OpenMode
protected TypedTextField<String>
static final String
protected com.vaadin.flow.component.button.Button
protected SearchProperties
protected Consumer<SearchField.SearchCompletedEvent>
allows to bind custom results handler to replace standard dialog/view opening behaviourprotected int
protected String
protected com.vaadin.flow.component.button.Button
protected com.vaadin.flow.component.Component
protected UiComponents
protected ViewNavigators
Fields inherited from interface io.jmix.flowui.kit.component.HasAutofocus
AUTOFOCUS_PROPERTY_NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
protected void
protected TypedTextField<String>
protected com.vaadin.flow.component.button.Button
protected com.vaadin.flow.component.button.Button
protected void
protected String
int
getValue()
protected void
protected void
boolean
boolean
protected void
openSearchResultsWindow
(String searchText) void
void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setEntities
(List<String> entities) void
setOpenMode
(OpenMode openMode) void
setPlaceholder
(String placeholder) protected void
setPresentationValue
(String newPresentationValue) void
setSearchButtonVisible
(boolean searchButtonVisible) void
void
setSearchSize
(int searchSize) void
setSearchStrategy
(String searchStrategy) void
setSettingsButtonVisible
(boolean settingsButtonVisible) Methods inherited from class com.vaadin.flow.component.customfield.CustomField
add, addThemeVariants, getLabel, onAttach, remove, removeThemeVariants, setLabel, updateValue
Methods inherited from class com.vaadin.flow.component.AbstractField
addValueChangeListener, getEmptyValue, isEmpty, setModelValue, setValue, valueEquals
Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
Methods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListener
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
Methods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndex
Methods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListener
Methods inherited from interface com.vaadin.flow.component.HasAriaLabel
getAriaLabel, getAriaLabelledBy, setAriaLabel, setAriaLabelledBy
Methods inherited from interface io.jmix.flowui.kit.component.HasAutofocus
isAutofocus, setAutofocus
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
Methods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabled
Methods inherited from interface com.vaadin.flow.component.HasHelper
getHelperComponent, getHelperText, setHelperComponent, setHelperText
Methods inherited from interface com.vaadin.flow.component.HasLabel
getLabel, setLabel
Methods inherited from interface com.vaadin.flow.component.HasPlaceholder
getPlaceholder
Methods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
Methods inherited from interface com.vaadin.flow.component.shared.HasSuffix
getSuffixComponent, setSuffixComponent
Methods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
Methods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, removeThemeVariants
Methods inherited from interface com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipText
Methods inherited from interface com.vaadin.flow.component.HasValidation
setManualValidation
Methods inherited from interface com.vaadin.flow.component.shared.HasValidationProperties
getErrorMessage, isInvalid, setErrorMessage, setInvalid
Methods inherited from interface com.vaadin.flow.component.HasValue
addValueChangeListener, clear, getEmptyValue, getOptionalValue, isEmpty, setValue
Methods inherited from interface com.vaadin.flow.component.HasValueAndElement
isReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisible
Methods inherited from interface com.vaadin.flow.component.InputNotifier
addInputListener
Methods inherited from interface com.vaadin.flow.component.KeyNotifier
addKeyDownListener, addKeyDownListener, addKeyPressListener, addKeyPressListener, addKeyUpListener, addKeyUpListener
-
Field Details
-
SEARCH_FIELD_STYLENAME
- See Also:
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
uiComponents
-
notifications
-
messages
-
searchProperties
-
dialogWindows
-
dialogs
-
root
-
searchStrategy
-
entities
-
openMode
-
searchSize
protected int searchSize -
searchButton
protected com.vaadin.flow.component.button.Button searchButton -
settingsButton
protected com.vaadin.flow.component.button.Button settingsButton -
searchResultHandler
allows to bind custom results handler to replace standard dialog/view opening behaviour -
entitySearcher
-
suffixComponent
protected com.vaadin.flow.component.Component suffixComponent
-
-
Constructor Details
-
SearchField
public SearchField()
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
autowireDependencies
protected void autowireDependencies() -
initComponent
protected void initComponent() -
generateModelValue
- Specified by:
generateModelValue
in classcom.vaadin.flow.component.customfield.CustomField<String>
-
setPlaceholder
- Specified by:
setPlaceholder
in interfacecom.vaadin.flow.component.HasPlaceholder
-
setPresentationValue
- Specified by:
setPresentationValue
in classcom.vaadin.flow.component.customfield.CustomField<String>
-
checkValueComponentState
protected void checkValueComponentState() -
createRootComponent
-
initRootComponent
-
createSuffixComponent
protected void createSuffixComponent() -
createSearchButton
protected com.vaadin.flow.component.button.Button createSearchButton() -
createSettingsButton
protected com.vaadin.flow.component.button.Button createSettingsButton() -
openSearchResultsWindow
-
performSearch
public void performSearch() -
setSearchCompletedHandler
-
getSearchCompletedHandler
-
getValue
- Specified by:
getValue
in interfacecom.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<String>,
String>, String> - Overrides:
getValue
in classcom.vaadin.flow.component.AbstractField<com.vaadin.flow.component.customfield.CustomField<String>,
String>
-
getEntities
-
setEntities
-
getOpenMode
-
setOpenMode
-
getSearchStrategy
-
setSearchStrategy
-
getSearchSize
public int getSearchSize() -
setSearchSize
public void setSearchSize(int searchSize) -
isSettingsButtonVisible
public boolean isSettingsButtonVisible() -
setSettingsButtonVisible
public void setSettingsButtonVisible(boolean settingsButtonVisible) -
isSearchButtonVisible
public boolean isSearchButtonVisible() -
setSearchButtonVisible
public void setSearchButtonVisible(boolean searchButtonVisible)
-