custom icon set by setPropertyValue disappears

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; (documentManger is the CoreSession) hoping that it would have made the icon change permanent, but it doesn't change this behaviour.

0 votes

2 answers



The default MimetypeIconUpdater listener probably overrides your changes

0 votes

Any workaround?

use another listener that overrides the default behaviour in your case, makijng sure it's executed after the default one:

The correct solution is to call CoreSession#saveDocument after setting the property and the icon no longer disappear.

0 votes