<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic custom icon set by setPropertyValue disappears in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/custom-icon-set-by-setpropertyvalue-disappears/m-p/313878#M879</link>
    <description>&lt;P&gt;I have an Action Seam Bean and a list of the currently selected documents called &lt;CODE&gt;selectedDocs&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;My button cycles the list and changes the icon of the documents in this way:&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;
for (DocumentModel selectedDoc : selectedDocs) {
selectedDoc.setPropertyValue("icon", "icons/archive.png");
}
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;
&lt;P&gt;where archive.png is an icon stored in the nuxeo.war&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;I tried calling &lt;CODE&gt;documentManager.save();&lt;/CODE&gt; (&lt;CODE&gt;documentManger&lt;/CODE&gt; is the &lt;CODE&gt;CoreSession&lt;/CODE&gt;) hoping that it would have made the icon change permanent, but it doesn't change this behaviour.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Dec 2012 12:20:08 GMT</pubDate>
    <dc:creator>roccapl_</dc:creator>
    <dc:date>2012-12-10T12:20:08Z</dc:date>
    <item>
      <title>custom icon set by setPropertyValue disappears</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/custom-icon-set-by-setpropertyvalue-disappears/m-p/313878#M879</link>
      <description>&lt;P&gt;I have an Action Seam Bean and a list of the currently selected documents called &lt;CODE&gt;selectedDocs&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;My button cycles the list and changes the icon of the documents in this way:&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;
for (DocumentModel selectedDoc : selectedDocs) {
selectedDoc.setPropertyValue("icon", "icons/archive.png");
}
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;
&lt;P&gt;where archive.png is an icon stored in the nuxeo.war&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;I tried calling &lt;CODE&gt;documentManager.save();&lt;/CODE&gt; (&lt;CODE&gt;documentManger&lt;/CODE&gt; is the &lt;CODE&gt;CoreSession&lt;/CODE&gt;) hoping that it would have made the icon change permanent, but it doesn't change this behaviour.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2012 12:20:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/custom-icon-set-by-setpropertyvalue-disappears/m-p/313878#M879</guid>
      <dc:creator>roccapl_</dc:creator>
      <dc:date>2012-12-10T12:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: custom icon set by setPropertyValue disappears</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/custom-icon-set-by-setpropertyvalue-disappears/m-p/313879#M880</link>
      <description>&lt;P&gt;The default MimetypeIconUpdater listener probably overrides your changes&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2012 13:48:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/custom-icon-set-by-setpropertyvalue-disappears/m-p/313879#M880</guid>
      <dc:creator>Anahide_Tchertc</dc:creator>
      <dc:date>2012-12-10T13:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: custom icon set by setPropertyValue disappears</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/custom-icon-set-by-setpropertyvalue-disappears/m-p/313880#M881</link>
      <description>&lt;P&gt;Any workaround?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2012 14:05:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/custom-icon-set-by-setpropertyvalue-disappears/m-p/313880#M881</guid>
      <dc:creator>roccapl_</dc:creator>
      <dc:date>2012-12-10T14:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: custom icon set by setPropertyValue disappears</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/custom-icon-set-by-setpropertyvalue-disappears/m-p/313881#M882</link>
      <description>&lt;P&gt;use another listener that overrides the default behaviour in your case, makijng sure it's executed after the default one&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2012 14:18:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/custom-icon-set-by-setpropertyvalue-disappears/m-p/313881#M882</guid>
      <dc:creator>Anahide_Tchertc</dc:creator>
      <dc:date>2012-12-10T14:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: custom icon set by setPropertyValue disappears</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/custom-icon-set-by-setpropertyvalue-disappears/m-p/313882#M883</link>
      <description>&lt;P&gt;The correct solution is to call &lt;A href="http://community.nuxeo.com/api/nuxeo/5.6/javadoc/org/nuxeo/ecm/core/api/CoreSession.html#saveDocument%28org.nuxeo.ecm.core.api.DocumentModel%29"&gt;CoreSession#saveDocument&lt;/A&gt; after setting the property and the icon no longer disappear.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2012 17:49:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/custom-icon-set-by-setpropertyvalue-disappears/m-p/313882#M883</guid>
      <dc:creator>roccapl_</dc:creator>
      <dc:date>2012-12-10T17:49:41Z</dc:date>
    </item>
  </channel>
</rss>

