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.WebValuePickerActionHandlerNested 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.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEventNested 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.SearchCompletedEventNested classes/interfaces inherited from interface io.jmix.ui.component.ValuePicker
ValuePicker.FieldValueChangeEvent<V>, ValuePicker.ValuePickerAction -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EntitySearcherprotected Messagesprotected ScreenBuildersstatic final Stringprotected Consumer<SearchField.SearchCompletedEvent>protected SearchPropertiesprotected SearchStrategyFields inherited from class io.jmix.ui.component.impl.ValuePickerImpl
actionButtons, actionHandler, actionPropertyChangeListener, actions, actionsPermissions, fieldIconProvider, fieldListenerRegistration, formatter, metadataToolsFields inherited from class io.jmix.ui.component.impl.AbstractField
editable, parentEditableChangeListener, validators, VALIDATORS_LIST_INITIAL_CAPACITYFields inherited from class io.jmix.ui.component.impl.AbstractValueComponent
internalValue, uiTestIdsSupport, valueBindingFields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parentFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZEFields inherited from interface io.jmix.searchui.component.SearchField
NAMEFields inherited from interface io.jmix.ui.component.ValuePicker
NAME, TYPE_STRING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the handler to be invoked when the search is successfully completed.Styles implementation is client-type-specific.protected voidprotected voidinitComponent(JmixPickerField<String> component) protected voidopenSearchResultsWindow(SearchResult searchResult) voidPerforms search.voidsetEntities(List<String> entities) Sets names of entities to search within.voidSets the handler to be invoked when the search is successfully completed.voidsetSearchStrategy(SearchStrategy searchStrategy) SetsSearchStrategyto this SearchField.voidsetStyleName(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, setValueFromUserMethods 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, validateMethods inherited from class io.jmix.ui.component.impl.AbstractValueComponent
addValueChangeListener, componentValueChanged, convertToModel, convertToPresentation, fieldValueEquals, getValue, getValueSource, setUiTestId, setUiTestIdsSupport, setValueSource, setValueToPresentation, valueBindingActivated, valueBindingConnectedMethods 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, withUnwrappedCompositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.ui.component.ActionsHolder
getActionNN, getSubPartMethods 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, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrameMethods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditableMethods inherited from interface io.jmix.ui.component.Component.Focusable
isFocusable, setFocusableMethods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescriptionMethods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSetMethods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledMethods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabledMethods inherited from interface io.jmix.ui.component.HasValidator
addValidator, addValidators, getValidators, removeValidatorMethods inherited from interface io.jmix.ui.component.HasValue
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValueMethods inherited from interface io.jmix.ui.component.data.HasValueSource
getValueSource, setValueSourceMethods inherited from interface io.jmix.ui.component.Requirable
getRequiredMessage, isRequired, setRequired, setRequiredMessageMethods 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:
initComponentin classValuePickerImpl<String>
-
initActions
protected void initActions() -
openSearchResultsWindow
-
performSearch
public void performSearch()Description copied from interface:SearchFieldPerforms search.- Specified by:
performSearchin interfaceSearchField
-
getStyleName
Description copied from interface:ComponentStyles implementation is client-type-specific.- Specified by:
getStyleNamein interfaceComponent- Overrides:
getStyleNamein classAbstractComponent<JmixPickerField<String>>- Returns:
- current style name.
-
setStyleName
Description copied from interface:ComponentSets 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:
setStyleNamein interfaceComponent- Overrides:
setStyleNamein classAbstractComponent<JmixPickerField<String>>- Parameters:
name- one or more style names separated by space.
-
getSearchStrategy
- Specified by:
getSearchStrategyin interfaceSearchField- Returns:
SearchStrategyrelated to this SearchField.
-
setSearchStrategy
Description copied from interface:SearchFieldSetsSearchStrategyto this SearchField.- Specified by:
setSearchStrategyin interfaceSearchField- Parameters:
searchStrategy-SearchStrategy
-
getEntities
- Specified by:
getEntitiesin interfaceSearchField- Returns:
- Names of entities configured to search within
-
setEntities
Description copied from interface:SearchFieldSets names of entities to search within.- Specified by:
setEntitiesin interfaceSearchField- Parameters:
entities- List of entity names
-
setSearchCompletedHandler
Description copied from interface:SearchFieldSets 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:
setSearchCompletedHandlerin interfaceSearchField- Parameters:
handler- handler
-
getSearchCompletedHandler
Description copied from interface:SearchFieldReturns the handler to be invoked when the search is successfully completed.- Specified by:
getSearchCompletedHandlerin interfaceSearchField- Returns:
- handler
-