Package io.jmix.dynmodelflowui.view
Class DynamicModelSettingsView
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<ViewLayout>
io.jmix.flowui.view.View<ViewLayout>
io.jmix.flowui.view.StandardView
io.jmix.dynmodelflowui.view.DynamicModelSettingsView
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasStyle,com.vaadin.flow.router.AfterNavigationObserver,com.vaadin.flow.router.BeforeEnterObserver,com.vaadin.flow.router.BeforeLeaveObserver,com.vaadin.flow.router.HasDynamicTitle,com.vaadin.flow.router.internal.AfterNavigationHandler,com.vaadin.flow.router.internal.BeforeEnterHandler,com.vaadin.flow.router.internal.BeforeLeaveHandler,FacetOwner,FragmentOwner,Serializable
- Direct Known Subclasses:
AgentDynamicModelSettingsView
@Route(value="dynmod-settings",
layout=DefaultMainViewParent.class)
@ViewController(id="dynmod_Settings")
@ViewDescriptor(path="dynmod-settings-view.xml")
public class DynamicModelSettingsView
extends StandardView
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classReflects the editor mode and active tab in the URL query parameters and restores them when the view is (re)opened with a deep link.Nested classes/interfaces inherited from class io.jmix.flowui.view.View
View.AfterCloseEvent, View.BeforeCloseEvent, View.BeforeShowEvent, View.InitEvent, View.PostReadyEvent, View.QueryParametersChangeEvent, View.ReadyEvent, View.RestoreComponentsStateEvent -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddFeatureBadge(com.vaadin.flow.component.html.Div wrapper, @Nullable Boolean enabled, String property, String theme) Adds a badge for an enabled attribute feature.protected voidapplyEditorStateFromUrl(com.vaadin.flow.router.QueryParameters queryParameters) protected voidprotected voidapplyTabParam(@Nullable String tab) com.vaadin.flow.data.renderer.Renderer<DynamicAttributeModel> com.vaadin.flow.data.renderer.Renderer<DynamicAttributeModel> com.vaadin.flow.data.renderer.Renderer<DynamicAttributeModel> protected com.vaadin.flow.router.QueryParametersBuilds the{mode, tab}query parameters for the current editor state.protected @Nullable Stringprotected static @Nullable StringfirstValue(@Nullable List<String> values) protected voidprotected StringgetAttributeLengthText(DynamicAttributeModel attribute) Renders the attribute length.protected StringgetAttributeTypeText(DynamicAttributeModel attribute) Renders the single type an attribute declares.protected booleanisSearchable(DynamicAttributeModel attribute) Whether Search indexes the attribute: either it is marked searchable in the dynamic model, or the application's own index definition already indexes it, where the searchable flag makes no difference.protected booleanWhether the Search add-on is present, so that a model authored elsewhere does not show a Searchable badge whereDynamicAttributeModelDetailViewwould have hidden the checkbox.protected booleanisTypeSearchIndexable(DynamicAttributeModel attribute) Whether Search's automatic mapping can map an attribute of this type: a String datatype, an enumeration or a reference.voidonApplyButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) voidvoidonCloseButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) voidonCopyToClipboardButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) voidonCreateRolesFieldValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixMultiSelectComboBox<String>, Set<String>> event) voidonDeleteRolesFieldValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixMultiSelectComboBox<String>, Set<String>> event) voidonEditorModeFieldValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixRadioButtonGroup<DynamicModelSettingsEditorMode>, DynamicModelSettingsEditorMode> event) voidonEntitiesDataGridSelection(com.vaadin.flow.data.selection.SelectionEvent<DataGrid<DynamicEntityModel>, DynamicEntityModel> event) voidonEnumsDataGridSelection(com.vaadin.flow.data.selection.SelectionEvent<DataGrid<DynamicEnumerationModel>, DynamicEnumerationModel> event) voidonHistoryButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) voidonInit(View.InitEvent event) voidonMoveAttributeDownButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) voidonMoveAttributeUpButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) voidonPackageSettingsButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) voidonReadRolesFieldValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixMultiSelectComboBox<String>, Set<String>> event) voidonUpdateRolesFieldValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixMultiSelectComboBox<String>, Set<String>> event) protected UiEntityAttributeContextprotected DynamicModelSettingsEditorModeparseEditorMode(@Nullable String id) protected voidProtects unsaved edits on every close path: the Close button, menu/breadcrumb navigation, browser back, and deep links all funnel throughView.BeforeCloseEvent.protected voidprotected voidprotected @Nullable StringselectedTabId(JmixTabSheet tabSheet) protected voidselectTab(JmixTabSheet tabSheet, String tabId) protected static @Nullable StringtabIdForSlug(Map<String, String> idToSlug, String slug) protected voidprotected voidMethods inherited from class io.jmix.flowui.view.View
addAfterCloseListener, addApplicationListeners, addBeforeCloseListener, addBeforeShowListener, addInitListener, addQueryParametersChangeListener, addReadyListener, addRestoreComponentsStateEventListener, afterNavigation, beforeEnter, beforeLeave, close, close, closeWithDefaultAction, configureDialogWindowFooter, configureDialogWindowHeader, getApplicationContext, getEventBus, getId, getPageTitle, getReturnParameters, getViewActions, getViewAttributes, getViewData, getViewFacets, getViewSupport, isPreventBrowserTabClosing, onAttach, onAttachInternal, onDetach, onDetachInternal, processBeforeEnterInternal, removeApplicationListeners, removeViewAttributes, setAfterNavigationHandler, setApplicationContext, setId, setPageTitle, setPreventBrowserTabClosing, setViewActions, setViewData, setViewFacets, unregisterBackNavigationMethods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElement, initContentMethods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, findAncestor, fireEvent, from, get, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setTestId, setVisible, whenAttachedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
MODE_PARAM
- See Also:
-
TAB_PARAM
- See Also:
-
TOP_TAB_ID_TO_SLUG
-
ENTITY_SUB_TAB_ID_TO_SLUG
-
-
Constructor Details
-
DynamicModelSettingsView
public DynamicModelSettingsView()
-
-
Method Details
-
onInit
-
onPackageSettingsButtonClick
@Subscribe("packageSettingsButton") public void onPackageSettingsButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) -
packageSettingsAccess
-
onEnumsDataGridSelection
@Subscribe("enumsDataGrid") public void onEnumsDataGridSelection(com.vaadin.flow.data.selection.SelectionEvent<DataGrid<DynamicEnumerationModel>, DynamicEnumerationModel> event) -
onEntitiesDataGridSelection
@Subscribe("entitiesDataGrid") public void onEntitiesDataGridSelection(com.vaadin.flow.data.selection.SelectionEvent<DataGrid<DynamicEntityModel>, DynamicEntityModel> event) -
onReadRolesFieldValueChange
@Subscribe("readRolesField") public void onReadRolesFieldValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixMultiSelectComboBox<String>, Set<String>> event) -
onCreateRolesFieldValueChange
@Subscribe("createRolesField") public void onCreateRolesFieldValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixMultiSelectComboBox<String>, Set<String>> event) -
onUpdateRolesFieldValueChange
@Subscribe("updateRolesField") public void onUpdateRolesFieldValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixMultiSelectComboBox<String>, Set<String>> event) -
onDeleteRolesFieldValueChange
@Subscribe("deleteRolesField") public void onDeleteRolesFieldValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixMultiSelectComboBox<String>, Set<String>> event) -
onMoveAttributeUpButtonClick
@Subscribe(id="moveAttributeUpButton", subject="clickListener") public void onMoveAttributeUpButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) -
onMoveAttributeDownButtonClick
@Subscribe(id="moveAttributeDownButton", subject="clickListener") public void onMoveAttributeDownButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) -
onEditorModeFieldValueChange
@Subscribe("editorModeField") public void onEditorModeFieldValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixRadioButtonGroup<DynamicModelSettingsEditorMode>, DynamicModelSettingsEditorMode> event) -
onCopyToClipboardButtonClick
@Subscribe(id="copyToClipboardButton", subject="clickListener") public void onCopyToClipboardButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) -
onHistoryButtonClick
@Subscribe(id="historyButton", subject="clickListener") public void onHistoryButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) -
onCloseButtonClick
@Subscribe(id="closeButton", subject="clickListener") public void onCloseButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) -
onBeforeClose
-
preventUnsavedChanges
Protects unsaved edits on every close path: the Close button, menu/breadcrumb navigation, browser back, and deep links all funnel throughView.BeforeCloseEvent. Pending visual-mode edits are flushed into the YAML content first so the dirty check sees them; if there are changes, navigation is postponed (or the close prevented) and a discard confirmation is shown. -
onApplyButtonClick
@Subscribe(id="applyButton", subject="clickListener") public void onApplyButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) -
applySettings
protected void applySettings() -
flushCurrentEditorMode
protected void flushCurrentEditorMode() -
writeDtoToYaml
protected void writeDtoToYaml() -
readYamlToDto
protected void readYamlToDto() -
selectEditorMode
-
attributesDataGridTypeRenderer
@Supply(to="attributesDataGrid.type", subject="renderer") public com.vaadin.flow.data.renderer.Renderer<DynamicAttributeModel> attributesDataGridTypeRenderer() -
getAttributeTypeText
Renders the single type an attribute declares. The three type properties are mutually exclusive, and the order below is the oneDynamicAttributeModelDetailViewinfers the attribute kind with. -
attributesDataGridLengthRenderer
@Supply(to="attributesDataGrid.length", subject="renderer") public com.vaadin.flow.data.renderer.Renderer<DynamicAttributeModel> attributesDataGridLengthRenderer() -
getAttributeLengthText
Renders the attribute length. A LOB has no length limit and the two properties are mutually exclusive, so one column carries both. -
attributesDataGridFeaturesRenderer
@Supply(to="attributesDataGrid.features", subject="renderer") public com.vaadin.flow.data.renderer.Renderer<DynamicAttributeModel> attributesDataGridFeaturesRenderer() -
isSearchable
Whether Search indexes the attribute: either it is marked searchable in the dynamic model, or the application's own index definition already indexes it, where the searchable flag makes no difference. -
isTypeSearchIndexable
Whether Search's automatic mapping can map an attribute of this type: a String datatype, an enumeration or a reference. It matters for an attribute the published model does not know yet, where nothing else rules it out. -
addFeatureBadge
protected void addFeatureBadge(com.vaadin.flow.component.html.Div wrapper, @Nullable Boolean enabled, String property, String theme) Adds a badge for an enabled attribute feature. The features that constrain the stored value get a colour of their own, the ones that only describe the attribute stay neutral. -
isSearchAddonPresent
protected boolean isSearchAddonPresent()Whether the Search add-on is present, so that a model authored elsewhere does not show a Searchable badge whereDynamicAttributeModelDetailViewwould have hidden the checkbox. -
updateEditorMode
-
buildEditorStateQueryParameters
protected com.vaadin.flow.router.QueryParameters buildEditorStateQueryParameters()Builds the{mode, tab}query parameters for the current editor state. Thetabparameter is emitted as an empty list (which removes it from the URL) in Code mode. -
buildTabParam
-
applyEditorStateFromUrl
protected void applyEditorStateFromUrl(com.vaadin.flow.router.QueryParameters queryParameters) -
parseEditorMode
-
applyTabParam
-
selectedTabId
-
selectTab
-
firstValue
-
tabIdForSlug
-