cancel
Showing results for 
Search instead for 
Did you mean: 

[Resolu]Creation model de donnees

marza
Champ in-the-making
Champ in-the-making
bonjour,

J'ai essayer de créer un modèle simple dans un premier temps mais lorsque je crée un document(add content) les paramètres (taille, hauteur et résolution)que j'avais configuré ne me sont pas demande à part dans la recherche avancée.
J'ai effectué plusieurs test mais en vain. :cry:
Pouvez vous m'aidez s'il vous plait.

Je vous joint mes fichiers pour vérifier d'éventuels erreurs :


SCmodel :

<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="my:somecomodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>
   <description>Someco Model</description>
   <author>Optaros</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 –>
   <namespaces>
      <namespace uri="http://www.someco.com/model/content/1.0" prefix="my" />
   </namespaces>

      <types>
         <type name="my:sop">
               <title>Fiche</title>
               <parent>cm:content</parent>
         </type>
       </types>
      
       <aspects>
         <aspect name="my:imageClassification">
            <title>Image Classification</title>
            <properties>
               <property name="my:width">
                  <type>d:int</type>
               </property>
               <property name="my:height">
                  <type>d:int</type>
               </property>
               <property name="my:resolution">
                  <type>d:int</type>
               </property>
            </properties>
         </aspect>
      </aspects>
</model>



Web-client -config-custom.xml :


<alfresco-config>

     <config evaluator="aspect-name" condition="my:imageClassification">
         <property-sheet>
            <show-property name="my:width" display-label-id="width"/>
            <show-property name="my:height" display-label-id="height"/>
            <show-property name="my:resolution" display-label-id="resolution"/>
         </property-sheet>
      </config>
  
  
      <config evaluator="node-type" condition="my:sop">
      <property-sheet>
         <show-property name="name" showInEditMode="false" />
         <show-property name="title" showInEditMode="false" />
         <show-property name="description" showInEditMode="false" />
   </property-sheet>
   </config>
  
  
   <!–  add someco types to add content list –>
      <config evaluator="string-compare" condition="Content Wizards">
         <content-types>
            <type name="my:sop" />
         </content-types>
      </config>

   <config evaluator="string-compare" condition="Action Wizards">
       <!– The list of aspects to show in the add/remove features action –>
       <!– and the has-aspect condition –>   
      <aspects>
         <!–
                             <aspect name="my:imageClassification"/>
                         –>         
          <aspect name="my:imageClassification" display-label="Image Classification"            display-label-id="image_classification"/>         
         
      </aspects>
      <!– The list of types shown in the is-subtype condition –>
      <subtypes>
         <type name="my:sop" />
      </subtypes>      
      <!– The list of content and/or folder types shown in the specialise-type action –>
      <specialise-types>
         <type name="my:sop" />         
      </specialise-types>      
   </config>   
  
   <config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
         <content-types>
            <type name="my:sop" />            
         </content-types>
         <custom-properties>
            <meta-data aspect="my:imageClassification" property="my:width" display-label-id="width" />
            <meta-data aspect="my:imageClassification" property="my:height" display-label-id="height" />
            <meta-data aspect="my:imageClassification" property="my:resolution" display-label-id=         "resolution" />
                        
         </custom-properties>
      </advanced-search>
   </config>
</alfresco-config>



  • 3 REPLIES 3

    bch
    Champ in-the-making
    Champ in-the-making
    Bonjour,

    Si ton type "my:sop" est toujours lié à l'aspect "my:imageClassification" (ce qui est le cas si tu attends de voir les propriétés de l'aspect dans le formulaire de création), il faut le préciser de cette manière :


            <type name="my:sop">
                   <title>Fiche</title>
                   <parent>cm:content</parent>
                   <mandatory-aspects>
                      <aspect>my:imageClassification</aspect>
                   </mandatory-aspects>
             </type>

    marza
    Champ in-the-making
    Champ in-the-making
    Ca marche ! Smiley Happy

    Merci beaucoup

    ourmech
    Champ in-the-making
    Champ in-the-making
    bonjour je sui tt nouvo a ce forum, je veu bien essaye ton example; dites moi svp ou dois ajouter ce code
    <type name="my:sop">
                   <title>Fiche</title>
                   <parent>cm:content</parent>
                   <mandatory-aspects>
                      <aspect>my:imageClassification</aspect>
                   </mandatory-aspects>
             </type>

    Merci bp pr votre aide