AnsweredAssumed Answered

Create new content model - part 2

Question asked by fuad_gafarov on May 7, 2011
Latest reply on May 9, 2011 by fuad_gafarov
Hi.

So, I try to create dynamic model. I follow the instructions - http://wiki.alfresco.com/wiki/Dynamic_Models
I uload 3 files.
1. upload 'exampleModel.xml' to the Data Dictionary/Models folder and select 'Model Active'
2. upload a 'web-client-custom-config.xml' to the Data Dictionary/Web Client Extension folder
3. reload from http://localhost:8080/alfresco/faces/jsp/admin/webclientconfig-console.jsp
4. upload a 'webclient.properties' to the Data Dictionary/web Client Extension folder
5. logout login

And can't see new content model


exampleModel.xml

<model name="my:mynewmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
   <description>Example custom Model</description>
   <author>Fuad Gafarov</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.new.model" prefix="my"/>
   </namespaces>



   <!– Type and Aspect definitions go here –>
     <types>
      <type name="my:sop">
         <title>Standard Operating Procedure</title>
         <parent>cm:content</parent>
         <properties>
            <property name="my:publishedDate">
               <type>d:datetime</type>
            </property>
            <property name="my:authorisedBy">
               <type>d:text</type>
            </property>
         </properties>
      </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-custom-config.xml


<alfresco-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-child-association name="my:processSteps" />
      </property-sheet>
   </config>

</alfresco-config>


webclient.properties


# web client custom I18N message properties

# example model
# see display-label-ids added to the web-client-config-custom.xml sample

# my:sop
my.publishedDate=07/05/11
my.authorisedBy=Fuad Gafarov
my.signOff=Sign Off
my.processSteps=step

# my:imageClassification
my.width=100
my.height=100
my.resolution=600x800



Please, help

Outcomes