07-16-2007 05:49 AM
<!– Definition of new Content Type: Press Release –>
<type name="eb:Opdracht">
<title>Opdracht</title>
<parent>cm:content</parent>
<properties>
<property name="eb:OpdrachtId">
<title>Opdracht id</title>
<type>d:int</type>
</property>
</properties>
<associations>
<association name="eb:Image">
<title>Plaatje</title>
<target>
<class>cm:content</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
<association name="eb:Bijlage">
<title>Bijlage</title>
<target>
<class>cm:content</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
<mandatory-aspects>
<aspect>cm:versionable</aspect>
</mandatory-aspects>
</type>
<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="eb:Opdracht" />
</content-types>
</config>
<config evaluator="node-type" condition="eb:Opdracht" >
<property-sheet>
<show-association name="eb:Image" />
<show-association name="eb:Bijlage" />
</property-sheet>
// log the docs that currently contain the word 'Alfresco' to a log file
var logFile = space.childByNamePath("ListProperties.txt");
if (logFile == null) {
logFile = space.createFile("ListProperties.txt");
}
if (logFile != null) {
var log = "";
log += "document properties: \r\n";
for (var propName in document.properties) {
var propValue = document.properties[propName];
log += propName + "=" + propValue + "\r\n";
}
log += "plaatjes\r\n";
for (var node in document.assocs["eb:Image"]) {
for (var propName in node.properties) {
log += "child " + propName + "=" + node.properties[propName] + "\r\n";
}
}
log += "any?\r\n";
for (var node in document.assocs) {
for (var propName in node.properties) {
log += "child " + propName + "=" + node.properties[propName] + "\r\n";
}
}
logFile.content += log;
}
07-16-2007 09:51 AM
for (var propName in node.properties) {
log += "child " + propName + "=" + node.properties[propName] + "\r\n";
}
to this does it show the nodes on the end of the assocs?
log += "child " + node.name + "\r\n";
07-16-2007 10:57 AM
07-17-2007 04:13 AM
for (var assocname in document.assocs) {
log += "assoc " + assocname + "\r\n";
for (assoc in document.assocs[assocname]) {
log += "assoc child " + assoc + "\r\n";
log += "assoc name " + document.assocs[assocname][assoc].properties.name + "\r\n";
}
}
07-17-2007 07:18 AM
I then get 'child undefined' in the output file. The associated document does have a name and a whole lot of other properties.
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.