AnsweredAssumed Answered

[SOLVED]Custom Model error

Question asked by monitloth on Oct 31, 2008
Latest reply on Nov 14, 2008 by monitloth
I followed the tutorial from the handbook to create a custom model (Customer Details). I get no errors, but the aspect is not shown, when at wizard.

web-client-config-custom.xml:

<alfresco-config>

<config evaluator="string-compare" condition="Action Wizards">
<aspects>
<aspect name="custom:CustomerDetails"/>
</aspects>
</config>
   <!– The config below shows how to incorporate the example model–>
   <!– into the web client, for this to work you will need to –>
   <!– rename example-model-context.xml.sample to example-model-context.xml –>
   <!– Displays the properties in view details page –>
<config evaluator="aspect-name" condition="custom:CustomerDetails">
<property-sheet>
<separator name="sepCust1" display-label="Customer Details" component-generator="HeaderSeparatorGenerator" />
<show-property name="custom:CustomerName"/>
<show-property name="custom:CustomerContactName"/>
<show-property name="custom:CustomerContactPhone"/>
<show-property name="custom:CustomerProjectID"/>
<show-property name="custom:NewCustomer"/>
</property-sheet>
</config>
</alfresco-config>

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>
    <!– Registration of new models –>  
    <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"?>
<!– Custom Model –>
<!– Note: This model is pre-configured to load at startup of the Repository.  So, all custom –>
<!–       types and aspects added here will automatically be registered –>
<model name="custom:customModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
   <!– Optional meta-data about the model –>  
   <description>Custom Model</description>
   <author></author>
   <version>1.0</version>
   <imports>
        <!– Import Alfresco Dictionary Definitions –>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
      <!– Import Alfresco Content Domain Model Definitions –>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
   </imports>

   <!– Introduction of new namespaces defined by this model –>
   <!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –>
   <namespaces>
      <namespace uri="custom.model" prefix="custom"/>
   </namespaces>
<aspects>
<!– Definition of new Content Aspect: Customer Details –>
<aspect name="custom:CustomerDetails">
<title>Customer Details</title>
<properties>
<property name="custom:CustomerName">
<title>Customer Name</title>
<type>d:text</type>
</property>
<property name="custom:CustomerContactName">
<title>Customer Contact Name</title>
<type>d:text</type>
</property>
<property name="custom:CustomerContactPhone">
<title>Customer Contact Phone</title>
<type>d:text</type>
</property>
<property name="custom:CustomerProjectID">
<title>Customer Project ID</title>
<type>d:int</type>
</property>
<property name="custom:NewCustomer">
<title>New Customer</title>
<type>d:boolean</type>
</property>
</properties>
</aspect>
</aspects>
</model>

I checked the forum.

Why don't I get the aspect?

Outcomes