Class StudioSearchComponentsPreviewLoader
java.lang.Object
io.jmix.searchflowui.kit.meta.loader.StudioSearchComponentsPreviewLoader
- All Implemented Interfaces:
StudioPreviewComponentLoader
public class StudioSearchComponentsPreviewLoader
extends Object
implements StudioPreviewComponentLoader
Studio preview loader for the search add-on's
search:searchField and
search:fullTextFilter components. Neither has a spring-free kit-level counterpart: the
runtime SearchField is ApplicationContextAware and the runtime
FullTextFilter extends SingleFilterComponentBase, both needing a live Spring
context that isn't available to a kit-only preview loader. This loader instead builds the plain
Vaadin component that StudioSearchComponents
already declares as the kit-meta return type for each: a TextField for
searchField, a HorizontalLayout for fullTextFilter.
fullTextFilter's runtime shape (a label + text field inside its root
HorizontalLayout) has no equivalent slot on a bare HorizontalLayout: there's no
label component to bind label to. The preview approximates it with a Span for
the resolved label text, followed by a placeholder TextField, added as plain
children of the layout - close enough to show the visible shape, not a faithful reproduction.
labelPosition/labelWidth act on that missing label slot so they're skipped, along
with the data-bound dataLoader/autoApply/searchStrategy/
parameterName attributes that need a runtime data context.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final StringFields inherited from interface io.jmix.flowui.kit.meta.component.preview.StudioPreviewComponentLoader
FRAGMENT_SCHEMA, MAIN_VIEW_SCHEMA, MAIN_VIEW_TAB_MODE_SCHEMA, VIEW_OR_FRAGMENT_SCHEMAS, VIEW_SCHEMA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisSupported(org.dom4j.Element element) Define the element that this loader can load.@Nullable com.vaadin.flow.component.Componentload(org.dom4j.Element componentElement, org.dom4j.Element viewElement) Create vaadin component from component xml element.@Nullable com.vaadin.flow.component.Componentload(org.dom4j.Element componentElement, org.dom4j.Element viewElement, StudioPreviewEnvironment environment) Create vaadin component from component xml element, with access to Studio-resolved context (e.g.protected com.vaadin.flow.component.orderedlayout.HorizontalLayoutloadFullTextFilter(org.dom4j.Element componentElement, StudioPreviewEnvironment environment) protected com.vaadin.flow.component.textfield.TextFieldloadSearchField(org.dom4j.Element componentElement, StudioPreviewEnvironment environment) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.flowui.kit.meta.component.preview.StudioPreviewComponentLoader
hasViewOrFragmentSchema, loadBoolean, loadBoolean, loadClassNames, loadComponentBaseAttributes, loadDouble, loadDouble, loadEnabled, loadEnum, loadEnum, loadFieldAttributes, loadHeight, loadInteger, loadInteger, loadLocalizedString, loadMaxHeight, loadMaxWidth, loadMinHeight, loadMinWidth, loadSizeAttributes, loadString, loadString, loadString, loadThemeNames, loadTooltip, loadWidth, propertyCaption, split, split
-
Field Details
-
SEARCH_SCHEMA
- See Also:
-
SEARCH_FIELD_ELEMENT
- See Also:
-
FULL_TEXT_FILTER_ELEMENT
- See Also:
-
-
Constructor Details
-
StudioSearchComponentsPreviewLoader
public StudioSearchComponentsPreviewLoader()
-
-
Method Details
-
isSupported
public boolean isSupported(org.dom4j.Element element) Description copied from interface:StudioPreviewComponentLoaderDefine the element that this loader can load.- Specified by:
isSupportedin interfaceStudioPreviewComponentLoader
-
load
public @Nullable com.vaadin.flow.component.Component load(org.dom4j.Element componentElement, org.dom4j.Element viewElement) Description copied from interface:StudioPreviewComponentLoaderCreate vaadin component from component xml element.- Specified by:
loadin interfaceStudioPreviewComponentLoader- Parameters:
componentElement- xml element of componentviewElement- xml element of view containingcomponentElement- See Also:
-
load
public @Nullable com.vaadin.flow.component.Component load(org.dom4j.Element componentElement, org.dom4j.Element viewElement, StudioPreviewEnvironment environment) Description copied from interface:StudioPreviewComponentLoaderCreate vaadin component from component xml element, with access to Studio-resolved context (e.g. localized messages, entity property captions).- Specified by:
loadin interfaceStudioPreviewComponentLoader- Parameters:
componentElement- xml element of componentviewElement- xml element of view containingcomponentElementenvironment- Studio-side environment;StudioPreviewEnvironment.NOOPwhen unavailable- See Also:
-
loadSearchField
protected com.vaadin.flow.component.textfield.TextField loadSearchField(org.dom4j.Element componentElement, StudioPreviewEnvironment environment) -
loadFullTextFilter
protected com.vaadin.flow.component.orderedlayout.HorizontalLayout loadFullTextFilter(org.dom4j.Element componentElement, StudioPreviewEnvironment environment)
-