cancel
Showing results for 
Search instead for 
Did you mean: 

Metadata not showing in properties

mskarica
Champ in-the-making
Champ in-the-making
Hi.  I created a new model which defines an aspect, which is intended to add one metadata field to any content added to alfresco, but the metadata field does not show anywhere (or I just can't find it).

Here are the steps I took:
1. Created the new model
2. Registered the model with the repository by adding it to core-services-context.xml
3. Added an entry to web-client-config-properties.xml so the metadata shows in the web client
4. Restarted the server, everything parsed fine.

Am I missing any steps?  What I want to happen is when somebody "Adds Content", I want the new metadata field to show as one of the fields in the properties…but it isn't.

Here is my model:
<?xml version="1.0" encoding="UTF-8"?>

<model name="dr:contentmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
   <description>My Model</description>
   <author>xxxxx</author>
   <published>2007-09-12</published>
   <version>1.0</version>
   
   <imports>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
   </imports>
   
   <namespaces>
      <namespace uri="dr.doh.model" prefix="dr"/>
   </namespaces>

   <aspects>
      <aspect name="dr:drRecovery">
         <title>Disaster Recovery</title>
         <parent>cm:content</parent>
         <properties>
            <property name="dr:restoreOrder">
               <title>Disaster Recovery Level</title>
               <description>Importance order in which a document should be recovered in case of disaster</description>
               <type>d:int</type>
               <mandatory>true</mandatory>
            </property>
         </properties>
      </aspect>
   </aspects>      
</model>
Here's what I added to core-services-context.xml (the 2nd entry)
 <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/model/defaultCustomModel.xml</value>
                <value>alfresco/model/DOH_Content_Model.xml</value>
            </list>
        </property>
    </bean>
And here's the entry I put into the web-client-config-properties.xml file:
<config evaluator="aspect-name" condition="dr:drRecovery">
   <property-sheet>
       <show-property name="dr:restoreOrder"/>
   </property-sheet>
</config>

Thanks in advance for any help.
10 REPLIES 10

dhalupa
Champ on-the-rise
Champ on-the-rise
Just add LIST type of constraint to your property. you can find an example in alfresco/model/bpmModel.xml