AnsweredAssumed Answered

[Résolu] Création de modèle personnalisé

Question asked by tchabaud on Jun 13, 2008
Latest reply on Jun 16, 2008 by tchabaud
Bonjour, je suis en train d'essayer de créer un modèle personnalisé en suivant les indications de la documentation, mais je n'arrive pas à faire apparaitre les propriétés que j'ai définies dans l'interface web. Je n'ai pas d'erreur dans les logs au lancement d'Alfresco.

Voici le contenu des fichiers xml :

    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>Me</author>
    <version>1.0</version>
    <imports>
        <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"></import>
        <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"></import>                    
    </imports>
   
    <namespaces>
        <namespace uri="custom.model" prefix="custom"></namespace>
    </namespaces>

    <types>
        <type name="custom:doc">
            <title>My Document</title>
            <parent>cm:content</parent>
            <associations>
                <association name="custom:relatedDocuments">
                    <title>Documents associes</title>
                    <source>
                        <mandatory>false</mandatory>
                        <many>true</many>
                    </source>
                    <target>
                        <class>custom:doc</class>
                        <mandatory>false</mandatory>
                        <many>true</many>
                    </target>
                </association>
            </associations>
            <mandatory-aspects>
                <aspect>cm:versionable</aspect>
            </mandatory-aspects>
        </type>
    </types>

    <aspects>
        <aspect name="custom:productRelated">
            <title>Donnees produit</title>
            <properties>
                <property name="custom:product">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="custom:version">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                </property>
            </properties>
        </aspect>
    </aspects>
</model>

    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="ca_ES">Catalan</language>
         <language locale="hr_HR">Croatian</language>
         <language locale="cs_CZ">Czech</language>
         <language locale="da_DK">Danish</language>
         <language locale="de_DE">German</language>
         <language locale="es_ES">Spanish</language>
         <language locale="el_GR">Greek</language>
         <language locale="fi_FI">Finnish</language>
         <language locale="fr_FR">French</language>
         <language locale="it_IT">Italian</language>
         <language locale="ja_JP">Japanese</language>
         <language locale="du_NL">Dutch</language>
         <language locale="pl_PL">Polish</language>
         <language locale="pt_PT">Portuguese</language>
         <language locale="pt_BR">Portuguese (Brazilian)</language>
         <language locale="ru_RU">Russian</language>
         <language locale="sv_SV">Swedish</language>
         <language locale="tr_TR">Turkish</language>
         <language locale="zh_CN">Simplified Chinese</language>
      </languages>
   </config>

    <config evaluator="aspect-name" condition="custom:productRelated">
        <property-sheet>
            <show-property name="custom:product" display-label-id="produit" />
            <show-property name="custom:version" display-label-id="version" />
            <show-association name="custom:relatedDocuments" />
        </property-sheet>
    </config>
   
    <config evaluator="node-type" condition="custom:productRelated">
      <property-sheet>
          <show-property name="custom:product" display-label-id="produit" />
          <show-property name="custom:version" display-label-id="version" />
          <show-association name="custom:relatedDocuments" />
      </property-sheet>
   </config>
</alfresco-config>

Est ce qu'une âme charitable pour m'expliquer ce qui cloche ? Merci d'avance.

Outcomes