AnsweredAssumed Answered

Dynamic models- Solved.

Question asked by miguel.martins on Jan 18, 2010
Latest reply on Jan 28, 2010 by miguel.martins
Hello there, I am trying to add a dynamic content type

This is my type



<model name="my:alunos" xmlns="http://www.alfresco.org/model/dictionary/1.0">
   <description>Alunos</description>
   <author>Mmartins</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>

   <namespaces>

      <!– Define a Namespace for my new definitions –>
      <namespace uri="my.alunos" prefix="my"/>
   </namespaces>


   <!– Type and Aspect definitions go here –>
   <types>
      <type name="my:alunos">
         <title>Alunos</title>
         <parent>cm:content</parent>
         <properties>
       <property name="my:Nome">
   <title>Nome</title>
                  <type>d:text</type>
               </property>
   <property name="my:DocumentodeID">
   <title>Documento de ID</title>
                  <type>d:text</type>
               </property>
            <property name="my:NumdocdeID">
   <title>Numero de documento de ID</title>
               <type>d:text</type>
            </property>
      <property name="my:datanascimento">
   <title>Data de nascimento</title>
               <type>d:datetime</type>
            </property>
            <property name="my:morada">
   <title>Morada</title>
               <type>d:text</type>
            </property>
    <property name="my:email">
   <title>Email</title>
               <type>d:text</type>
            </property>
<property name="my:telefone">
<title>Telefone</title>
               <type>d:number</type>
            </property>
<property name="my:curso">
<title>Curso</title>
               <type>d:text</type>
            </property>
<property name="my:Escola">
<title>Escola/Instituição</title>
               <type>d:text</type>
            </property>
<property name="my:Bolseiro">
   <title>Bolseiro</title>
   <type>d:boolean</type>
   <default>false</default>
</property>
      <property name="my:datadebolseiro">
<title>Data de Bolseiro( Bolseiro desde)</title>
               <type>d:datetime</type>
            </property>
            <property name="my:nib">
<title>Nib</title>
               <type>d:text</type>
            </property>
<property name="my:numconta">
<title>Numero de conta</title>
               <type>d:text</type>
            </property>
<property name="my:numbanco">
<title>numero do banco</title>
               <type>d:text</type>
            </property>
         </properties>

   </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>

Its supposed to be a content model called alunos, that has several text fields ( and some date ones) .
What am I doing wrong? Everytime I try to load it up onto data dictionary models it gives me a parsing error.

Any help would be welcomed since I am pretty new at this and might have interpreted the wiki tutorials wrong.

Outcomes