cancel
Showing results for 
Search instead for 
Did you mean: 

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

elise
Champ in-the-making
Champ in-the-making
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
5 REPLIES 5

elise
Champ in-the-making
Champ in-the-making
Bon, j'ai deja trouver.
Il fallais que je poste ici pour enfin y arriver.

En faite comme cela faisait 2 jours que j'étais dessus j'ai modifié mes fichiers dans tous les sens.
Et en corrigant mes premières ereurs j'en avait rajouter.

michaelh
Champ on-the-rise
Champ on-the-rise
Ca fait 2 bonnes nouvelles :
- C'est résolu
- Je peux cesser de réfléchir à une réponse Smiley Wink

elise
Champ in-the-making
Champ in-the-making
merci de  t'être penché sur le problème.

vbaudry
Champ in-the-making
Champ in-the-making
Si tes fichier postés plus haut ne sont pas les bons, je veux bien savoir ce que tu as dû modifier, des fois que j'ai le même soucis quand je vais mettre les mains dans le cambouis Smiley Happy

Merci d'avance

unknown-user
Champ on-the-rise
Champ on-the-rise
J'ai créé un modèle mais impossible de le voir apparaître… ???
J'ai testé mon modèle et il est correct. Pas d'erreur non plus au démarrage de la WebApp.