I have a search screen with authors, and I load the data using a custom query in init from AuthorsBrowse :: AbstractLookup. I am manipulating the data that I want to display, but the changes should not be saved.
If I close the tab, I will open the dialog box for this message:
You have unsaved changes. Do you want to discard unsaved changes?
How can I suppress this message?
This message appears if any data source has been modified.
If you want to suppress the message, you need to add the datasource attribute (which has been changed) allowCommit="false", for example:
allowCommit="false"
<collectionDatasource id="authorsDs" class="com.haulmont.workshop.core.entity.Author" view="_local" allowCommit="false"> <query> <![CDATA[ select e from ws$Author e where e.status = 10 ]]> </query> </collectionDatasource>
, Window.Committable. isModified(), .
Window.Committable
isModified()
AbstractEditor , isModified() :
AbstractEditor
@Override public boolean isModified() { return getDsContext() != null && getDsContext().isModified(); }
Window.Committable false isModified().