AnsweredAssumed Answered

Custom aspects, what am I doing wrong?

Question asked by ejholmgren on Nov 12, 2008
Latest reply on Nov 25, 2008 by libman
I have the following files in /opt/Alfresco/tomcat/shared/classes/alfresco/extension:

custom-model-context.xml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

    <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/customModel.xml</value>
            </list>
        </property>
    </bean>

</beans>

customModel.xml
<?xml version="1.0" encoding="UTF-8"?>
<model name="custom:customModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <description>Custom Model</description>
   <author>Eric</author>
   <version>1.0</version>

   <imports>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
   </imports>

   <namespaces>
      <namespace uri="custom.model" prefix="custom"/>
   </namespaces>

   <aspects>
      <aspect name="custom:customAspect">
         <title>Custom Aspect</title>
         <properties>
            <property name="custom:custom_aspect_id">
               <title>custom_aspect_id</title>
               <type>d:int</type>
            </property>
         </properties>
      </aspect>
   </aspects>

</model>

web-client-custom-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<alfresco-config>

   <config evaluator="string-compare" condition="Action Wizards">
      <aspects>
         <aspect name="custom:customAspect" display-label="Custom Aspect" display_label_id="custom_aspect" />
      </aspects>
   </config>

   <config evaluator="aspect-name" condition="custom:customAspect">
      <property-sheet>
         <separator name="sepCust1" display-label="Custom Aspect" component-generator="HeaderSeparatorGenerator" />
         <show-property name="custom:custom_aspect_id" />
      </property-sheet>
   </config>

</alfresco-config>

When I restart tomcat, my new aspect does not appear in the Action Wizard. No errors in the tomcat or alfresco logs either though. What am I doing wrong?

Outcomes