AnsweredAssumed Answered

How to show properties of the inherited custom content ?

Question asked by acis on Feb 22, 2008
Latest reply on Nov 17, 2010 by iblanco
Hi all,

I've started to work with Alfresco since a few days and I try currently to create custom content and display their properties.

In my xml model, I've defined two custom types, one inherits from "cm:content" and the second inherits from my first custom type :


   <types>

      <type name="mym:MySupDoc">
         <title>My Super Doc</title>
         <parent>cm:content</parent>
         <properties>
            <property name="mym:MySupProp">
               <title>My Super Prop</title>
               <type>d:text</type>
            </property>
         <properties>
      </type>

      <type name="mym:MyDoc">
         <title>My Doc</title>
         <parent>mym:MySupDoc</parent>
         <properties>
            <property name="mym:MyProp">
               <title>My Prop</title>
               <type>d:text</type>
            </property>
         <properties>
      </type>

   </types>

In the web-client-config-custom.xml, I added the following code to see my two new types in the content wizard and show their properties in the view/edit properties window:


   <config evaluator="string-compare" condition="Content Wizards">
         <content-types>
            <type name="mym:MySupDoc"/>
            <type name="mym:MyDoc"/>
         </content-types>
   </config>
  
   <config evaluator="node-type" condition="mym:MySupDoc">
      <property-sheet>
         <show-property name="mym:MySupProp" />
      </property-sheet>
   </config>
  
   <config evaluator="node-type" condition="mym:MyDoc">
      <property-sheet>
         <show-property name="mym:MyProp" />
      </property-sheet>
   </config>

When I create a new content, I can choose between my two custom content and if I create a new "mym:MyDoc", I have only, as custom properties, "mym:MyProp". I don't see the custom property "mym:MySupProp" of the inherited custom type.

What should I do to see the custom properties of the inherited custom type?

(if I add <show-property name="mym:MySupProp" /> in the <config evaluator="node-type" condition="mym:MyDoc">, it works, but I don't think that redefine all of the custom properties of the inherited type is the right way).

thanks in advance.

Outcomes