As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<aspect name="custom:ThumbnailAspect"> <title>Thumbnail Aspect</title> <associations> <association name="custom:Thumbnail"> <title>Thumbnail</title> <source> <many>true</many> </source> <target> <class>cm:content</class> <mandatory>false</mandatory> <many>false</many> <!– allow only one thumbnail to be added –> </target> </association> </associations> </aspect>
var props = new Array(1); props["custom:Thumbnail"] = PATH; var added= document.addAspect("custom:ThumbnailAspect", props);
<aspect name="custom:ThumbnailAspect"> <title>Thumbnail Aspect</title> <properties> <property name="custom:Thumbnail"> <title>Thumbnail</title> <type>d:noderef</type> <mandatory>false</mandatory> </property> </properties> </aspect>
var assocs = document.assocs["custom:Thumbnail"]; var testFile = currentFolder.childByNamePath("contentFPKX.jpg"); //a different content… if (assocs != null) { assocs[0] = testFile; }
i see that assocs[0] is changing to the testFile value, but it is not saved anywhere…. (not saved to the DB :?: ???? :?at the JavaScript API it says that assocs returns a read only value… is there a way to bypass this??
<type>d:noderef</type>
WARN [component.property.UIProperty] Setting property {custom.model}Thumbnail to read-only as it can not be edited