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:
  • Field Details

  • Constructor Details

    • DynamicModelSettingsView

      public DynamicModelSettingsView()
  • Method Details

    • onInit

      @Subscribe public void onInit(View.InitEvent event)
    • onPackageSettingsButtonClick

      @Subscribe("packageSettingsButton") public void onPackageSettingsButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event)
    • packageSettingsAccess

      protected UiEntityAttributeContext 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

      @Subscribe public void onBeforeClose(View.BeforeCloseEvent event)
    • preventUnsavedChanges

      protected void preventUnsavedChanges(View.BeforeCloseEvent event)
      Protects unsaved edits on every close path: the Close button, menu/breadcrumb navigation, browser back, and deep links all funnel through View.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

      protected void selectEditorMode(DynamicModelSettingsEditorMode mode)
    • attributesDataGridTypeRenderer

      @Supply(to="attributesDataGrid.type", subject="renderer") public com.vaadin.flow.data.renderer.Renderer<DynamicAttributeModel> attributesDataGridTypeRenderer()
    • getAttributeTypeText

      protected String getAttributeTypeText(DynamicAttributeModel attribute)
      Renders the single type an attribute declares. The three type properties are mutually exclusive, and the order below is the one DynamicAttributeModelDetailView infers the attribute kind with.
    • attributesDataGridLengthRenderer

      @Supply(to="attributesDataGrid.length", subject="renderer") public com.vaadin.flow.data.renderer.Renderer<DynamicAttributeModel> attributesDataGridLengthRenderer()
    • getAttributeLengthText

      protected String getAttributeLengthText(DynamicAttributeModel attribute)
      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

      protected boolean isSearchable(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.
    • isTypeSearchIndexable

      protected boolean isTypeSearchIndexable(DynamicAttributeModel attribute)
      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 where DynamicAttributeModelDetailView would have hidden the checkbox.
    • updateEditorMode

      protected void updateEditorMode(DynamicModelSettingsEditorMode mode)
    • buildEditorStateQueryParameters

      protected com.vaadin.flow.router.QueryParameters buildEditorStateQueryParameters()
      Builds the {mode, tab} query parameters for the current editor state. The tab parameter is emitted as an empty list (which removes it from the URL) in Code mode.
    • buildTabParam

      protected @Nullable String buildTabParam()
    • applyEditorStateFromUrl

      protected void applyEditorStateFromUrl(com.vaadin.flow.router.QueryParameters queryParameters)
    • parseEditorMode

      protected DynamicModelSettingsEditorMode parseEditorMode(@Nullable String id)
    • applyTabParam

      protected void applyTabParam(@Nullable String tab)
    • selectedTabId

      protected @Nullable String selectedTabId(JmixTabSheet tabSheet)
    • selectTab

      protected void selectTab(JmixTabSheet tabSheet, String tabId)
    • firstValue

      protected static @Nullable String firstValue(@Nullable List<String> values)
    • tabIdForSlug

      protected static @Nullable String tabIdForSlug(Map<String,String> idToSlug, String slug)