diff --git a/metasfresh-webui-api/src/main/java/de/metas/ui/web/window/model/DocumentCollection.java b/metasfresh-webui-api/src/main/java/de/metas/ui/web/window/model/DocumentCollection.java index 1ef64596f..6cc310160 100644 --- a/metasfresh-webui-api/src/main/java/de/metas/ui/web/window/model/DocumentCollection.java +++ b/metasfresh-webui-api/src/main/java/de/metas/ui/web/window/model/DocumentCollection.java @@ -92,14 +92,14 @@ public Document load(final DocumentKey documentKey) public void onReset(String tableName, int recordId) { getDocumentPaths(tableName, recordId) - .forEach(documentPath -> forDocumentReadonlyIfLoaded(documentPath, document -> document.refreshFromRepository())); + .forEach(documentPath -> invalidateDocumentByPath(documentPath)); } }; /* package */ DocumentCollection() { super(); - + CacheMgt.get().addCacheMgtListener(cacheMgtListener); } @@ -257,6 +257,11 @@ public R forRootDocumentWritable(final DocumentPath documentPathOrNew, final } } + private final void invalidateDocumentByPath(final DocumentPath documentPath) + { + forDocumentReadonlyIfLoaded(documentPath, document -> document.refreshFromRepository()); + } + /** * Creates a new root document. *