cancel
Showing results for 
Search instead for 
Did you mean: 

about student registration model

hdalang
Champ in-the-making
Champ in-the-making
I have created the following model and it's not working, can someone tell if have written my model in the right way:

<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="iua:studentmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
    <!– Optional meta-data about the model –>
    <description>Student Details</description>
    <author>Hisham Khartoum</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.iua.edu.sd/model/content/1.0" prefix="iua" />
    </namespaces>
    <constraints>
        <constraint name="iua:studentSelectGender" type="LIST">
            <parameter name="allowedValues">
                <list>
                    <value>Male</value>
                    <value>Female</value>
                </list>
            </parameter>
        </constraint>
        <constraint name="iua:studentSelectCourseType" type="LIST">
            <parameter name="allowedValues">
                <list>
                    <value>Diploma</value>
                    <value>Bachelor</value>
                    <value>Master</value>
                    <value>PHD</value>
                </list>
            </parameter>
        </constraint>
       
        <constraint name="iua:studentContactNo" type="MINMAX">
            <parameter name="minValue">
            <value>1</value>
            </parameter>
            <parameter name="maxValue">
            <value>99999999999999</value>
            </parameter>
        </constraint>
        <constraint name="iua:studentSelectCountry" type="LIST">
            <parameter name="allowedValues">
                <list>
                    <value>Afghanistan</value>
                    <value>Albania</value>
                    <value>Algeria</value>
                    <value>American Samoa</value>
                    <value>Andorra</value>
               
                </list>
            </parameter>
        </constraint>
    </constraints>
   <types>
        <type name="iua:stdBachelorReg">
            <title>Student Registration Details</title>
            <parent>cm:content</parent>
         <mandatory-aspects>
            <aspect>iua:stdDetails</aspect>
         </mandatory-aspects>
      </type>
        <type name="iua:stdHigherDiplomaReg">
            <title>Student Registration Details for Higher Diploma</title>
            <parent>cm:content</parent>
            <properties>
                <property name="iua:studentBachelor">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentBachelorDegree">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
            </properties>
         <mandatory-aspects>
            <aspect>iua:stdDetails</aspect>
         </mandatory-aspects>
      </type>
        <type name="iua:stdMasterReg">
            <title>Student Registration Details for Master Degree</title>
            <parent>cm:content</parent>
            <properties>
                <property name="iua:studentBachelor">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentBachelorDegree">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentHigherDiplomaName">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentHigherDiplomaDegree">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
            </properties>
         <mandatory-aspects>
            <aspect>iua:stdDetails</aspect>
         </mandatory-aspects>
        </type>
        <type name="iua:stdPHDReg">
            <title>Student Registration Details for PHD Degree</title>
            <parent>cm:content</parent>
            <properties>
                <property name="iua:studentBachelor">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
            </property>
                <property name="iua:studentBachelorDegree">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentHigherDiplomaName">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentHigherDiplomaDegree">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentMaster">
                    <type>d:any</type>
                </property>
                <property name="iua:studentMasterDegree">
                    <type>d:any</type>
                </property>               
            </properties>
         <mandatory-aspects>
            <aspect>iua:stdDetails</aspect>
         </mandatory-aspects>
      </type>
   </types>
   <aspects>
      <aspect name="iua:stdDetails">
         <title>Student Registration Details</title>
         <parent>cm:content</parent>
         <properties>
                <property name="iua:studentFirstName">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentSecondName">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentLastName">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentFamilyName">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentBirthDate">
                    <type>d:date</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentGender">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                    <constraints>
                       <constraint ref="iua:studentSelectGender"/>
                  </constraints>
                   </property>
                <property name="iua:studentCountry">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                    <constraints>
                       <constraint ref="iua:studentSelectCountry"/>
                  </constraints>
                  </property>
                  <property name="iua:studentCity">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                    <multiple>true</multiple>
                </property>
                <property name="iua:studentStreetName">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentEmail">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                    <multiple>true</multiple>
                </property>
                <property name="iua:studentContact">
                    <type>d:int</type>
                    <mandatory>true</mandatory>
                    <constraints>
                       <constraint ref="iua:studentContactNo"/>
                  </constraints>                   
                </property>
                <property name="iua:studentSecondContact">
                    <type>d:int</type>
                    <mandatory>true</mandatory>
                    <constraints>
                       <constraint ref="iua:studentContactNo"/>
                  </constraints>
                </property>
                <property name="iua:studentThirdContact">
                    <type>d:int</type>
                    <mandatory>true</mandatory>
                    <constraints>
                       <constraint ref="iua:studentContactNo"/>
                  </constraints>
                </property>
                <property name="iua:studentPostalCode">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentSkype">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentHighSchoolName">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentHighSchoolDegree">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>            
         </properties>
      </aspect>
   </aspects>
</model>





————————————————————————————————
Husham Khartoum | Software Engineer
3 REPLIES 3

s_palyukh
Star Contributor
Star Contributor
Hi,

Your model looks correctly… Can you explain what you mean under "model doesn't work"?
How do you deploy your model? What kind of errors do you see in the log file?

hdalang
Champ in-the-making
Champ in-the-making
Thanks for replying, I don't know but it's not working, I have placed it in "datadictionary/model/" and I have tried to make it as active but it gives me error, I dont know if it's OK or not.

muralidharand
Star Contributor
Star Contributor
Hi,
Can you please share your alfresco.log file with the model error details?