Class AgentDynamicModelSettingsView
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
io.jmix.dynmodelaiflowui.view.settings.AgentDynamicModelSettingsView
- 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,DynamicModelEditorContext,FacetOwner,FragmentOwner,Serializable
@Route(value="dynmod-settings",
layout=DefaultMainViewParent.class)
@ViewController(id="dynmod_Settings")
@ViewDescriptor(path="agent-dynamic-model-settings-view.xml")
@CssImport("./dmagent/builder-workspace.css")
public class AgentDynamicModelSettingsView
extends DynamicModelSettingsView
implements DynamicModelEditorContext
Dynamic Model Settings with the AI Builder: replaces the native view by its id and route, and adds
the AI mode next to Visual and Code. The native view keeps the unsaved model, its Visual/Code
synchronization and the common Apply; the Builder only reads the model and installs a completed
AI result while the editor is unchanged.
Relies on the component ids and protected methods of
DynamicModelSettingsView;
this is not a Dynamic Model API, so the view tests cover the integration.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.dynmodelflowui.view.DynamicModelSettingsView
DynamicModelSettingsView.EditorStateUrlQueryParametersBinderNested 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 inherited from class io.jmix.dynmodelflowui.view.DynamicModelSettingsView
ENTITY_SUB_TAB_ID_TO_SLUG, MODE_PARAM, TAB_PARAM, TOP_TAB_ID_TO_SLUG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidonAgentInit(View.InitEvent event) protected voidClosing the view also asks before discarding a running Run or a result not transferred yet.booleanreplaceContent(EditorModelSnapshot expected, String content) Installs a complete result only while the editor still matches the request's snapshot.voidsetAiBusy(boolean busy) Keeps manual editing and publication unavailable while a Run is active, including approval.snapshot()Flushes pending Visual edits and captures the complete current model.protected voidprotected voidThe editor is read-only while a Run is active: serializing the unchanged Visual model again would only reformat the content the Run started from and refuse the transfer of its result.Methods inherited from class io.jmix.dynmodelflowui.view.DynamicModelSettingsView
addFeatureBadge, applyEditorStateFromUrl, applyTabParam, attributesDataGridFeaturesRenderer, attributesDataGridLengthRenderer, attributesDataGridTypeRenderer, buildEditorStateQueryParameters, buildTabParam, firstValue, flushCurrentEditorMode, getAttributeLengthText, getAttributeTypeText, isSearchable, isSearchAddonPresent, isTypeSearchIndexable, onApplyButtonClick, onBeforeClose, onCloseButtonClick, onCopyToClipboardButtonClick, onCreateRolesFieldValueChange, onDeleteRolesFieldValueChange, onEditorModeFieldValueChange, onEntitiesDataGridSelection, onEnumsDataGridSelection, onHistoryButtonClick, onInit, onMoveAttributeDownButtonClick, onMoveAttributeUpButtonClick, onPackageSettingsButtonClick, onReadRolesFieldValueChange, onUpdateRolesFieldValueChange, packageSettingsAccess, parseEditorMode, readYamlToDto, selectEditorMode, selectedTabId, selectTab, tabIdForSlugMethods 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
-
Constructor Details
-
AgentDynamicModelSettingsView
public AgentDynamicModelSettingsView()
-
-
Method Details
-
onAgentInit
-
updateEditorMode
- Overrides:
updateEditorModein classDynamicModelSettingsView
-
writeDtoToYaml
protected void writeDtoToYaml()The editor is read-only while a Run is active: serializing the unchanged Visual model again would only reformat the content the Run started from and refuse the transfer of its result.- Overrides:
writeDtoToYamlin classDynamicModelSettingsView
-
applySettings
protected void applySettings()- Overrides:
applySettingsin classDynamicModelSettingsView
-
snapshot
Description copied from interface:DynamicModelEditorContextFlushes pending Visual edits and captures the complete current model.- Specified by:
snapshotin interfaceDynamicModelEditorContext
-
replaceContent
Description copied from interface:DynamicModelEditorContextInstalls a complete result only while the editor still matches the request's snapshot.- Specified by:
replaceContentin interfaceDynamicModelEditorContext
-
setAiBusy
public void setAiBusy(boolean busy) Description copied from interface:DynamicModelEditorContextKeeps manual editing and publication unavailable while a Run is active, including approval.- Specified by:
setAiBusyin interfaceDynamicModelEditorContext
-
preventUnsavedChanges
Closing the view also asks before discarding a running Run or a result not transferred yet.- Overrides:
preventUnsavedChangesin classDynamicModelSettingsView
-