05-31-2007 10:10 AM
<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>now, i need to add the content of this aspect (which will be a link to another file) using a java script.var props = new Array(1);
props["custom:Thumbnail"] = PATH;
var added= document.addAspect("custom:ThumbnailAspect", props);
05-31-2007 11:33 AM
<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>
Your code (assuming PATH=some node) will then work.05-31-2007 11:35 AM
var assocs = document.assocs["custom:Thumbnail"];
var testFile = currentFolder.childByNamePath("contentFPKX.jpg"); //a different content…
if (assocs != null)
{
assocs[0] = testFile;
}05-31-2007 11:50 AM
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??
06-03-2007 03:29 AM
<type>d:noderef</type> WARN [component.property.UIProperty] Setting property {custom.model}Thumbnail to read-only as it can not be edited)
06-04-2007 05:35 AM
06-04-2007 07:03 AM
06-04-2007 07:17 AM
06-08-2007 09:55 AM
06-20-2007 04:16 AM
Tags
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.