AnsweredAssumed Answered

Cannot see document Custom type properties , when checking

Question asked by bisana on Jun 5, 2012
Latest reply on Jun 5, 2012 by bisana
Hi
  I am trying out with "Custom Type" and its properties, I am referring the  docs by "Jeff Potts" Working with custom content types
http://ecmarchitect.com/archives/2012/01/09/1509
I have created only one Custom  document type with two properties. I am able to see this "Document Types" and its properties, while selecting Advanced search options
I also able to see he document type, during defining rules
The problem I face is strange,
After I applying  a document with the custom Type, I don't see the Custon Type properties which I had defined.
I have gone through the document page 22- 25 , a lot of times, I cannot find out where I had made mistake, why I am not able to see the custom type  properties when I select document properties.
I am posting my configuration files,please guide me so that I know where I had gone wrong

My model.xml file is that

<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="sc:somecomodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>Someco Model</description>
<author>Jeff Potts</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="sc" />
</namespaces>
    <constraints>
        <constraint name="sc:LDconstraints" type="LIST">
            <parameter name="allowedValues">
                <list>
                    <value>Acquisitions</value>
                    <value>Amendments</value>
                    <value>Article of Associations</value>
                    <value>Board Resolutions</value>
                    <value>Financial Leasing Agreement</value>
                    <value>Franchise</value>
                    <value>Letters</value>
                    <value>Licenses-Copyright</value>
                    <value>Licenses-Intellectual Property</value>
                    <value>Licenses-Patent</value>
                    <value>Merger</value>
                    <value>Minutes of Meetings</value>
                    <value>Mo Associations</value>
                    <value>Non-disclosure Agreement</value>
                    <value>Purchase</value>
                    <value>Sales</value>
                    <value>Service</value>
                    <value>Submissions</value>
                    <value>Supplie</value>
                </list>
            </parameter>
            <parameter name="caseSensitive">
                <value>true</value>
            </parameter>
        </constraint>
   

   <constraint name="sc:purposeList" type="LIST">
<parameter name="allowedValues">
<list>
  <value></value>
<value>Consultation</value>
<value>Due Diligence</value>
<value>Audit</value>
<value>Employment</value>
</list>
</parameter>
</constraint>
    </constraints>
  <types>

<!– Enterprise-wide generic document type –>

<type name="sc:legaldept">
<title>Legal Department Documents</title>
<parent>cm:content</parent>
<properties>
    <property name="sc:lddoctype">
        <type>d:text</type>
        <mandatory>true</mandatory>
     <constraints>
            <constraint ref="sc:LDconstraints" />
        </constraints>
   </property>
  
   <property name="sc:purpose">
   <type>d:text</type>
<mandatory>true</mandatory>
  <constraints>
<constraint ref="sc:purposeList" />
</constraints>
</property>
</properties>
</type>
</types>
</model>

My "share-config-custom.xml" file has the following contents


<alfresco-config>
     <!– cm:content type (existing nodes) –>
   <config evaluator="node-type" condition="sc:legaldept">
      <forms>
         <!– Default form configuration for the cm:content type –>
         <form>
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="mimetype" />
               <show id="cm:author" force="true" />
               <show id="size" for-mode="view" />
               <show id="cm:creator" for-mode="view" />
               <show id="cm:created" for-mode="view" />
               <show id="cm:modifier" for-mode="view" />
               <show id="cm:modified" for-mode="view" />
              
               <!– tags and categories –>
               <show id="cm:taggable" for-mode="edit" force="true" />
               <show id="cm:categories" />
              
               <!– cm:dublincore aspect –>
               <show id="cm:publisher"/>
               <show id="cm:contributor"/>
               <show id="cm:type"/>
               <show id="cm:identifier"/>
               <show id="cm:dcsource"/>
               <show id="cm:coverage"/>
               <show id="cm:rights"/>
               <show id="cm:subject"/>
              
               <!– cm:complianceable aspect –>
               <show id="cm:removeAfter" />
              
               <!– cm:effectivity aspect –>
               <show id="cm:from"/>
               <show id="cm:to"/>
              
               <!–  cm:summarizable aspect –>
               <show id="cm:summary" />
              
               <!– cm:translatable aspect –>
               <show id="cm:translations" />
              
               <!– cm:localizable aspect –>
               <show id="cm:locale" />
              
               <!– cm:ownable aspect –>
               <show id="cm:owner" />
              
               <!– cm:attachable aspect –>
               <show id="cm:attachments" />
              
               <!– cm:emailed aspect –>
               <show id="cm:originator" />
               <show id="cm:addressee" />
               <show id="cm:addressees" />
               <show id="cm:sentdate" />
               <show id="cm:subjectline" />
              
               <!– exif:exif aspect –>
               <show id="exif:dateTimeOriginal" />
               <show id="exif:pixelXDimension" />
               <show id="exif:pixelYDimension" />
               <show id="exif:exposureTime" />
               <show id="exif:fNumber" />
               <show id="exif:flash" />
               <show id="exif:focalLength" />
               <show id="exif:isoSpeedRatings" />
               <show id="exif:manufacturer" />
               <show id="exif:model" />
               <show id="exif:software" />
               <show id="exif:orientation" />
               <show id="exif:xResolution" />
               <show id="exif:yResolution" />
               <show id="exif:resolutionUnit" />

               <!– audio:audio aspect –>
               <show id="audio:album" />
               <show id="audio:artist" />
               <show id="audio:composer" />
               <show id="audio:engineer" />
               <show id="audio:genre" />
               <show id="audio:trackNumber" />
               <show id="audio:releaseDate" />
               <show id="audio:sampleRate" />
               <show id="audio:sampleType" />
               <show id="audio:channelType" />
               <show id="audio:compressor" />
              
               <!– cm:indexControl aspect –>
               <show id="cm:isIndexed" />
               <show id="cm:isContentIndexed" />
              
               <!– cm:geographic aspect –>
               <show id="cm:latitude" />
               <show id="cm:longitude" />
          <!–  sc:doc –>
       
           <show id="sc:legaldept" />
         
            </field-visibility>
            <appearance>
               <field id="cm:name">
                 <control>
                    <control-param name="maxLength">255</control-param>
                 </control>
               </field>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:description">
                  <control>
                     <control-param name="activateLinks">true</control-param>
                  </control>
               </field>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
               </field>
               <field id="size">
                  <control template="/org/alfresco/components/form/controls/size.ftl" />
               </field>
               <field id="cm:taggable">
                  <control>
                     <control-param name="compactMode">true</control-param>
                     <control-param name="params">aspect=cm:taggable</control-param>
                     <control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
                     <control-param name="createNewItemIcon">tag</control-param>
                  </control>
               </field>
               <field id="cm:categories">
                  <control>
                     <control-param name="compactMode">true</control-param>
                  </control>
               </field>
               <field id="cm:originator" read-only="true" />
               <field id="cm:addressee" read-only="true" />
               <field id="cm:addressees" read-only="true" />
               <field id="cm:sentdate" read-only="true" />
               <field id="cm:subjectline" read-only="true" />
          <!– added extra  –>
        
          <field id="sc:legaldept" label-id="assoc.sc_legaldept" />

            </appearance>
         </form>

         <!– Document Library pop-up Edit Metadata form –>
         <form id="doclib-simple-metadata">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <!– tags and categories –>
               <show id="cm:taggable" for-mode="edit" force="true" />
               <show id="cm:categories" />
            </field-visibility>
            <edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl" />
            <appearance>
               <field id="cm:name">
                 <control>
                    <control-param name="maxLength">255</control-param>
                 </control>
               </field>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:description">
                  <control>
                     <control-param name="activateLinks">true</control-param>
                  </control>
               </field>
               <field id="cm:taggable">
                  <control>
                     <control-param name="compactMode">true</control-param>
                     <control-param name="params">aspect=cm:taggable</control-param>
                     <control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
                     <control-param name="createNewItemIcon">tag</control-param>
                  </control>
               </field>
               <field id="cm:categories">
                  <control>
                     <control-param name="compactMode">true</control-param>
                  </control>
               </field>
            </appearance>
         </form>
        
         <!– Document Library Inline Edit form –>
         <form id="doclib-inline-edit">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:content" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:name">
                 <control>
                    <control-param name="maxLength">255</control-param>
                 </control>
               </field>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:content">
                  <control>
                     <control-param name="editorAppearance">explorer</control-param>
                     <control-param name="forceEditor">true</control-param>
                  </control>
               </field>
            </appearance>
         </form>
      </forms>
   </config>
  
  <config replace="true" evaluator="string-compare" condition="AdvancedSearch">
<advanced-search>
<!– Forms for the advanced search type list –>
<forms>
<form labelId="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content</form>
<form labelId="search.form.label.cm_folder" descriptionId="search.form.desc.cm_folder">cm:folder</form>
<form labelId="type.sc_legaldept" descriptionId="search.form.desc.sc_legaldept">sc:legaldept</form>
</forms>
</advanced-search>
</config>



<!– cm:content type (creating nodes) –>
   <config evaluator="model-type" condition="sc:legaldept">
      <forms>
         <!– Default Create Content form –>
         <form>
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:content" force="true" />
               <show id="mimetype" />
               <show id="app:editInline" force="true" />
              
            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:content">
                  <control>
                     <control-param name="editorAppearance">explorer</control-param>
                  </control>
               </field>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">mimeType</control-param>
                  </control>
               </field>
               <field id="app:editInline">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">editInline</control-param>
                  </control>
               </field>
            </appearance>
         </form>
         <!– Document Library Create Google Doc form –>
         <form id="doclib-create-googledoc">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:content" force="true" />
               <show id="mimetype" />
               <show id="gd:googleEditable" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:content">
                  <control>
                     <control-param name="editorAppearance">none</control-param>
                     <control-param name="forceContent">true</control-param>
                  </control>
               </field>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">mimeType</control-param>
                  </control>
               </field>
               <field id="gd:googleEditable">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">googleEditable</control-param>
                  </control>
               </field>
            </appearance>
         </form>
         <!– Search form –>
         <form id="search">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="mimetype" />
               <show id="cm:modified" />
               <show id="cm:modifier" />
           <!– sc:lddoctypeRelated –>
               <show id="sc:lddoctype" />
               <show id="sc:purpose" />
               <!– sc:webable –>
               <show id="sc:isActive" />
               <show id="sc:published" />
            </field-visibility>
            <appearance>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
               </field>
               <field id="cm:modifier">
                  <control>
                     <control-param name="forceEditable">true</control-param>
                  </control>
               </field>
               <field id="cm:modified">
                  <control template="/org/alfresco/components/form/controls/daterange.ftl" />
               </field>
      
               <!– sc:lddoctypeRelated –>
               <field id="sc:lddoctype" label-id="prop.sc_lddoctype">
                <control template="/org/alfresco/components/form/controls/selectone.ftl" />
               </field>
               <field id="sc:purpose" label-id="prop.sc_purpose">
                  <control template="/org/alfresco/components/form/controls/selectone.ftl" />
               </field>
               <!– sc:webable –>
          
        <!–  <field id="sc:isActive" label-id="prop.sc_isActive">
                   <control template="/org/alfresco/components/form/controls/checkbox.ftl" />
               </field>
               <field id="sc:published" label-id="prop.sc_published">
                   <control template="/org/alfresco/components/form/controls/daterange.ftl" />
               </field>
                     –>
      
            </appearance>
         </form>
      </forms>
   </config>




  <config evaluator="aspect" condition="sc:legaldept">
  <forms>
  <form>
  <field-visibility>
  <show id="sc:published" />
  <show id="sc:isActive" />
  </field-visibility>
  <appearance>
  <field id="sc:published" label-id="prop.sc_published" />
  <field id="sc:isActive" label-id="prop.sc_isActive" />
  </appearance>
  </form>
  </forms>
  </config>

  
  
<!– Document Library config section –>
<config evaluator="string-compare" condition="DocumentLibrary">

<aspects>
<!– Aspects that a user can see –>
<visible>
  <!–
<aspect name="sc:webable" />
<aspect name="sc:lddoctypeRelated" />
–>
</visible>
<addable>
  <!– Aspects that a user can add. Same as "visible" if left empty –>
</addable>

<!– Aspects that a user can remove. Same as "visible" if left empty –>
<removeable>
</removeable>
</aspects>

<types>
<type name="cm:content">
<subtype name="sc:legaldept" />
</type>
</types>
</config>
</alfresco-config>

I do not come from Java, XML programming background, I would like to request help in solving this issue.
Thanks
Joseph John

Outcomes