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
@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 voidapplyEditorStateFromUrl(com.vaadin.flow.router.QueryParameters queryParameters) protected voidprotected voidapplyTabParam(@Nullable String tab) 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 booleanvoidonApplyButtonClick(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) voidonInit(View.InitEvent 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 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 booleanprotected voidprotected @Nullable StringselectedTabId(JmixTabSheet tabSheet) protected voidselectTab(JmixTabSheet tabSheet, String tabId) protected static @Nullable StringtabIdForSlug(Map<String, String> idToSlug, String slug) protected voidprotected booleanMethods 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, setVisibleMethods 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
-
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) -
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) -
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 boolean flushCurrentEditorMode() -
writeDtoToYaml
protected boolean writeDtoToYaml() -
readYamlToDto
protected boolean readYamlToDto() -
selectEditorMode
-
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
-