Package io.jmix.searchui.component.impl
Class SearchFieldImpl
java.lang.Object
- All Implemented Interfaces:
SearchField
,ActionsHolder
,AttachNotifier
,Buffered
,Component
,Component.BelongToFrame
,Component.Editable
,Component.Focusable
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Component.HasXmlDescriptor
,Component.Wrapper
,HasValueSource<String>
,Field<String>
,HasContextHelp
,HasDebugId
,HasFormatter<String>
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,HasInputPrompt
,HasSubParts
,HasValidator<String>
,HasValue<String>
,Requirable
,SecuredActionsHolder
,SupportsUserAction<String>
,Validatable
,ValuePicker<String>
,org.springframework.beans.factory.InitializingBean
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.ui.component.impl.ValuePickerImpl
ValuePickerImpl.WebValuePickerActionHandler
Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasValue
HasValue.ValueChangeEvent<V>
Nested classes/interfaces inherited from interface io.jmix.searchui.component.SearchField
SearchField.SearchCompletedEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.ValuePicker
ValuePicker.FieldValueChangeEvent<V>, ValuePicker.ValuePickerAction
-
Field Summary
Modifier and TypeFieldDescriptionprotected EntitySearcher
protected Messages
protected ScreenBuilders
static final String
protected Consumer<SearchField.SearchCompletedEvent>
protected SearchProperties
protected SearchStrategy
Fields inherited from class io.jmix.ui.component.impl.ValuePickerImpl
actionButtons, actionHandler, actionPropertyChangeListener, actions, actionsPermissions, fieldIconProvider, fieldListenerRegistration, formatter, metadataTools
Fields inherited from class io.jmix.ui.component.impl.AbstractField
editable, parentEditableChangeListener, validators, VALIDATORS_LIST_INITIAL_CAPACITY
Fields inherited from class io.jmix.ui.component.impl.AbstractValueComponent
internalValue, uiTestIdsSupport, valueBinding
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Fields inherited from interface io.jmix.searchui.component.SearchField
NAME
Fields inherited from interface io.jmix.ui.component.ValuePicker
NAME, TYPE_STRING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the handler to be invoked when the search is successfully completed.Styles implementation is client-type-specific.protected void
protected void
initComponent
(JmixPickerField<String> component) protected void
openSearchResultsWindow
(SearchResult searchResult) void
Performs search.void
setEntities
(List<String> entities) Sets names of entities to search within.void
Sets the handler to be invoked when the search is successfully completed.void
setSearchStrategy
(SearchStrategy searchStrategy) SetsSearchStrategy
to this SearchField.void
setStyleName
(String name) Sets one or more style names of the component, replacing any previous styles.Methods inherited from class io.jmix.ui.component.impl.ValuePickerImpl
actionPropertyChanged, addAction, addAction, addFieldValueChangeListener, afterPropertiesSet, applyDefaultValueFormat, commit, createComponent, discard, focus, formatValue, generateOptionIcon, getAction, getActions, getActionsPermissions, getFieldIconProvider, getFormatter, getInputPrompt, getTabIndex, isBuffered, isFieldEditable, isModified, onFieldValueChange, refreshActionsState, removeAction, removeAction, removeAllActions, setBuffered, setButtonIcon, setDebugId, setEditableToComponent, setFieldEditable, setFieldIconProvider, setFormatter, setFrame, setInputPrompt, setMetadataTools, setTabIndex, setUiComponentProperties, setupButtonAction, setValue, setValueFromUser
Methods inherited from class io.jmix.ui.component.impl.AbstractField
addValidator, attachValueChangeListener, getDatatypeConversionErrorMsg, getDefaultRequiredMessage, getErrorMessage, getRequiredMessage, getValidators, isEditable, isRequired, isValid, removeValidator, setEditable, setParent, setRequired, setRequiredMessage, setupComponentErrorProvider, triggerValidators, validate
Methods inherited from class io.jmix.ui.component.impl.AbstractValueComponent
addValueChangeListener, componentValueChanged, convertToModel, convertToPresentation, fieldValueEquals, getValue, getValueSource, setUiTestId, setUiTestIdsSupport, setValueSource, setValueToPresentation, valueBindingActivated, valueBindingConnected
Methods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDescription, setDescriptionAsHtml, setEnabled, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setResponsive, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.ui.component.ActionsHolder
getActionNN, getSubPart
Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditable
Methods inherited from interface io.jmix.ui.component.Component.Focusable
isFocusable, setFocusable
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods inherited from interface io.jmix.ui.component.HasValidator
addValidator, addValidators, getValidators, removeValidator
Methods inherited from interface io.jmix.ui.component.HasValue
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValue
Methods inherited from interface io.jmix.ui.component.data.HasValueSource
getValueSource, setValueSource
Methods inherited from interface io.jmix.ui.component.Requirable
getRequiredMessage, isRequired, setRequired, setRequiredMessage
Methods inherited from interface io.jmix.ui.component.Validatable
isValid, isValidateOnCommit, validate
-
Field Details
-
SEARCH_FIELD_STYLENAME
- See Also:
-
messages
-
entitySearcher
-
screenBuilders
-
searchProperties
-
searchStrategy
-
entities
-
searchCompletedHandler
-
-
Constructor Details
-
SearchFieldImpl
public SearchFieldImpl()
-
-
Method Details
-
initComponent
- Overrides:
initComponent
in classValuePickerImpl<String>
-
initActions
protected void initActions() -
openSearchResultsWindow
-
performSearch
public void performSearch()Description copied from interface:SearchField
Performs search.- Specified by:
performSearch
in interfaceSearchField
-
getStyleName
Description copied from interface:Component
Styles implementation is client-type-specific.- Specified by:
getStyleName
in interfaceComponent
- Overrides:
getStyleName
in classAbstractComponent<JmixPickerField<String>>
- Returns:
- current style name.
-
setStyleName
Description copied from interface:Component
Sets one or more style names of the component, replacing any previous styles. Multiple styles can be specified as a space-separated list of style names. Styles implementation is client-type-specific.- Specified by:
setStyleName
in interfaceComponent
- Overrides:
setStyleName
in classAbstractComponent<JmixPickerField<String>>
- Parameters:
name
- one or more style names separated by space.
-
getSearchStrategy
- Specified by:
getSearchStrategy
in interfaceSearchField
- Returns:
SearchStrategy
related to this SearchField.
-
setSearchStrategy
Description copied from interface:SearchField
SetsSearchStrategy
to this SearchField.- Specified by:
setSearchStrategy
in interfaceSearchField
- Parameters:
searchStrategy
-SearchStrategy
-
getEntities
- Specified by:
getEntities
in interfaceSearchField
- Returns:
- Names of entities configured to search within
-
setEntities
Description copied from interface:SearchField
Sets names of entities to search within.- Specified by:
setEntities
in interfaceSearchField
- Parameters:
entities
- List of entity names
-
setSearchCompletedHandler
Description copied from interface:SearchField
Sets the handler to be invoked when the search is successfully completed.The preferred way to set the handler is using a controller method annotated with
Install
, e.g.:@Install(to = "mySearchField", subject = "searchCompletedHandler") public void mySearchFieldSearchCompletedHandler(SearchField.SearchCompletedEvent event) { SearchResult searchResult = event.getSearchResult(); //... }
- Specified by:
setSearchCompletedHandler
in interfaceSearchField
- Parameters:
handler
- handler
-
getSearchCompletedHandler
Description copied from interface:SearchField
Returns the handler to be invoked when the search is successfully completed.- Specified by:
getSearchCompletedHandler
in interfaceSearchField
- Returns:
- handler
-