AnsweredAssumed Answered

BonjourJe suis en train d'essayer de créer un modèle...

Question asked by elise on Jul 5, 2006
Latest reply on Oct 18, 2006 by unknown-user
Bonjour

Je suis en train d'essayer de créer un modèle afin de defini de nouveaux types dérivant du type content.

Je me suis inspirée de l'exemple de la page http://wiki.alfresco.com/wiki/Data_Dictionary_Guide
J'arrive a recréer le modèle de l'exemple, mais je n'arrive pas a créer mes propre modèles.
Ce qui de passe, c'est que alfresco démarre corectement mais que le nouveau type n'apparait pas.

Voici mes différents fichiers situés en   …alfresco-1.3.0tomcatsharedclassesalfrescoextension

commercialModel.xml
<?xml version="1.0" encoding="UTF-8"?>

<!– Definition of new Model –>

<!– The important part here is the name - Note: the use of the my: namespace
     which is defined further on in the document –>
<model name="cial:commercialmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>  
   <description>Model Commercial</description>
   <author>Elise JANVIER</author>
   <version>1.0</version>

   <!– Imports are required to allow references to definitions in other models –>  
   <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 my.new.model should be changed to reflect your own namespace –>
   <namespaces>
      <namespace uri="cial.commercial.model" prefix="cial"/>
   </namespaces>
  
   <types>
  
      <!– Definition of new Content Type: Standard Operating Procedure –>
      <type name="cial:facture">
         <title>Facture</title>
         <parent>cm:content</parent>
         <properties>
            <property name="cial:consultant">
               <type>d:text</type>
            </property>
            <property name="cial:client">
               <type>d:text</type>
            </property>
         <property name="cial:projet">
               <type>d:text</type>
            </property>
         </properties>
      </type>
   
    </types>
  
</model>

example-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/commercialModel.xml</value>
                <value>alfresco/extension/exampleModel.xml</value>
            </list>
        </property>
    </bean>
         
</beans>
web-client-config-custom.xml
<alfresco-config>

    <!– Example of adding languages to the list in the login page –>
  
   <config evaluator="string-compare" condition="Languages">
      <languages>
         <language locale="fr_FR">French</language>
      </languages>
   </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 –>
  
   <config evaluator="string-compare" condition="Content Wizards">
      <content-types>
         <type name="my:sop" />
   <type name="cial:facture"/>
      </content-types>
   </config>

   <config evaluator="node-type" condition="my:sop">
      <property-sheet>
         <show-property name="mimetype" display-label-id="content_type"
                        component-generator="MimeTypeSelectorGenerator" />
         <show-property name="size" display-label-id="size"
                        converter="org.alfresco.faces.ByteSizeConverter"
                        show-in-edit-mode="false" />              
         <show-property name="my:publishedDate" />
         <show-association name="my:signOff" />
         <show-property name="my:authorisedBy" />
       <show-property name="my:testType" />
         <show-child-association name="my:processSteps" />
      </property-sheet>
   </config>
   <config evaluator="node-type" condition="cial:facture">
      <property-sheet>
         <show-property name="cial:consultant" />
         <show-property name="cial:client" />
       <show-property name="cial:projet" />
      </property-sheet>
   </config>


</alfresco-config>
merci d'avance pour votre aide

Outcomes