I have a lookup screen with authors and I load the data by using a custom query in init from AuthorsBrowse::AbstractLookup. I manipulate the data I want to display, but the changes should not be saved.
If I close the tab i get this message dialog:
You have unsaved changes Do you want to discard unsaved changes?
How can I suppress this message?
This message appears if anything datasource was changed.
If you want suppress message, you need to add to datasource (that was changed) attribute allowCommit="false"
, like that:
<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>