1

I have a custom model called "medicalBill" that inherits from another custom model called "clientDocument". For some reason in the share UI only the "clientDocument" is visible in the change type dialog. I have read that in the change type dialog it only shows models that are subtypes of cm:content. Does that mean ONLY direct subtypes?

I have this in my share-config-custom.xml is it not possible to have a subtype of a subtype here.

      <types>
         <type name="cm:content">
                <subtype name="cd:clientDocument">
                    <subtype name="mb:medicalBill"/>
                </subtype>

         </type>

         <type name="cm:folder">
         </type>
      </types>

Edit: I am running alfresco 3.4d on jboss under linux.

startoftext
  • 3,846
  • 7
  • 40
  • 49

1 Answers1

4

Depending on which version of Alfresco you're using, the Change Type dialog in Share is configured differently

Alfresco < 3.4

You need to override the default configuration

Alfresco >= 3.4

You need to place the configuration in (e.g.) share-config-custom.xml

Regardless of the approach, the configuration will look like the following:

<type name="my:sourceType">
      <subtype name="my:targetType1"/>
      <subtype name="my:targetType2"/>
      ...
</type>

Where you specify which types are available for selection in the drop down (my:targetType*) depending on the type of the content you're acting on (my:sourceType).

As subtype elements cannot be nested, you have to specify all the possible type changes as sibling elements. As long as the source type is an ancestor type of the target type, everything should work as expected. To stick with your example:

  <types>
     <type name="cm:content">
            <subtype name="cd:clientDocument" />
            <subtype name="mb:medicalBill" />
     </type>

     <type name="cm:folder">
     </type>
  </types>

If you also need to show mb:medicalBill in the change type dropdown for cd:clientDocument documents you need to add another <type name="cd:clientDocument>..." element in the XML

skuro
  • 13,414
  • 1
  • 48
  • 67
  • So that works but If I have have a subtype of a subtype like i put in my question above only the first subtype shows up. So in the xml I gave in my question all I can see is the clientDocument type. Any other ideas? – startoftext Jul 22 '11 at 17:15
  • Hi startoftext, don't make clientDocument the parent of medicalData, but instead use aspects to add similar data to the types. Then both will show. – Tahir Malik Jul 22 '11 at 20:56
  • Answer updated to answer the subtype of a subtype concern. You simply don't have to describe the full hierarchy of inheritance as nested `subtype`s. – skuro Jul 26 '11 at 07:53
  • O okay. Heh, I was thinking that I needed to specify the entire hierarchy there. – startoftext Jul 26 '11 at 16:28