AnsweredAssumed Answered

Custom model and custom content creation

Question asked by nowhere on Apr 22, 2009
Latest reply on Oct 11, 2010 by matjazmuhic
Hi all,
I have a problem, surely silly to you all.
I have created a custom content as follow:

<type name="my:nc">
      <title>My content</title>
         <property name="my:level">
                                          <constraint type="LIST">                
                                              <parameter name="allowedValues">
            <property name="my:description">
         <child-association name="my:nc2v">

And I changed my "web-client-config.xml as follows:

    <config evaluator="string-compare" condition="Content Wizards">
         <!– <type name="my:sop" /> –>
         <type name="my:nc" />

<config evaluator="node-type" condition="my:nc">
         <show-property name="my:level" show-in-edit-mode="true" />
         <show-property name="my:description" show-in-edit-mode="true" />
         <show-child-association name="my:nc2v" show-in-edit-mode="true"/>

so, I can create a content of type my:nc…
The problem is in association "nc2v" where I defined "Mandatory=true" for target class. When I create content it fails with following error:

   A system error happened during the operation: Found 1 integrity violations: The association child multiplicity has been violated: Source Node: workspace://SpacesStore/55b22865-065b-4fb0-b1fa-5905225bc315 Association: Association[ class=ClassDef[name={}nc], name={}nc2v, target class={}ckvi, source role=null, target role=null] Required child Multiplicity: 1..1 Actual child Multiplicity: 0

Obviously It disappear if I set mandatory false…but can't I set the association when I create the content? That's… I would like to set it in "create content wizard"  :?:
Thanks for any suggestion you would give me :)