12-10-2012 07:20 AM
I have an Action Seam Bean and a list of the currently selected documents called selectedDocs
My button cycles the list and changes the icon of the documents in this way:
for (DocumentModel selectedDoc : selectedDocs) {
selectedDoc.setPropertyValue("icon", "icons/archive.png");
}
where archive.png is an icon stored in the nuxeo.war
Now, the icon changes, but if i logout or create a new file in the same workspace it disappears and it's replaced by the default icon.
I tried calling documentManager.save();
(documentManger
is the CoreSession
) hoping that it would have made the icon change permanent, but it doesn't change this behaviour.
12-10-2012 08:48 AM
The default MimetypeIconUpdater listener probably overrides your changes
12-10-2012 08:48 AM
The default MimetypeIconUpdater listener probably overrides your changes
12-10-2012 09:05 AM
Any workaround?
12-10-2012 09:18 AM
use another listener that overrides the default behaviour in your case, makijng sure it's executed after the default one
12-10-2012 12:49 PM
The correct solution is to call CoreSession#saveDocument after setting the property and the icon no longer disappear.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.