AnsweredAssumed Answered

How to set value for a <child-association> element

Question asked by partha on Mar 24, 2008
Latest reply on Mar 25, 2008 by sdavis
Hi,
     I have created my own custom Content Model and it has two <type> elements which reperesents two Nodes and a <child-association> element and i want to create association between these two <type> elements by using this <child-association> Can any one tell me how to do this like…
      1.Is it possible or not?
      2.If possible how i can set value for this child-association,
      3.if not what is the use of this child-assocation element
      4.how i can achive giving association between two nodes

My Content Model is here…
<types>
<type name="sam:fileBasedContent">
<title>Document Content</title>
<parent>cm:content</parent>
<properties>
<property name="sam:category">
   <type>d:text</type>
   <mandatory enforced="true">true</mandatory>
   <multiple>false</multiple>
</property>
.
.
.
</properties>
<associations>
<child-association name="sam:employee">
   <title>Employee Details</title>
   <source>
      <mandatory>false</mandatory>
      <many>true</many>
   </source>
   <target>
      <class>sam:employeeDetails</class>
      <mandatory>false</mandatory>
      <many>true</many>
   </target>
</child-association>
</associations>
</type>

<type name="sam:employeeDetails">
<title>Document Content1</title>
<parent>cm:content</parent>
<properties>
<property name="sam:name">
   <type>d:text</type>
   <multiple>false</multiple>
</property>
</type>
</types>

If any one can post some code sample then it will be very much help full for me to solce my issue?
Thanks.

Outcomes