cancel
Showing results for 
Search instead for 
Did you mean: 

Custom content in Share : extra non wanted metadatas appear

eos
Champ in-the-making
Champ in-the-making
Hello,

I created a custom model called my:doc with two aspects my:typageDocument and my:etatDocument, following the tutorial there : http://edlovesjava.blogspot.com/2009/07/alfresco-forms-engine-customization.html

Everything is fine in Explorer, but not that well in Share. In the folder Tomcat\shared\classes\alfresco\web-extension I modified the file web-framework-config-custom.xml as suggested by the tutorial :
<alfresco-config>    <config evaluator="node-type" condition="my:doc">    <forms>       <form>          <field-visibility>             <!– inherited from cm:content –>             <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" />                        <!–  specific for my:doc –>             <show id="my:client" label="Client"/>             <show id="my:projet" label="Projet"/>             <!–  aspect my:typageDocument  –>                        <show id="my:typageDocument" />                       <!–  aspect my:etatDocument  –>                        <show id="my:etatDocument" />                     </field-visibility> –>                    <appearance>             <field id="my:client" label="Client"/>             <field id="my:projet" label="Projet"/>             <field id="my:typ" label="TYP">                <control template="controls/selectone.ftl">                   <control-param name="options">TYP,GPD</control-param>                </control>             </field>          <field id="my:nChrono" label="N° Chrono"/>          <field id="my:etat" label="Etat">                <control template="controls/selectone.ftl">                   <control-param name="options">En cours de rédaction,En cours de validation,Publié</control-param>                </control>             </field>          </appearance>         </form>      </forms>   </config>  </alfresco-config>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Then, to enable the user in Share to manage the two custom aspects and to change the type of content into my custom content, I also modified the file share-config-custom.xml in the same folder (here I give just the interesting parts of the script, I haven't touch nothing else) :
<alfresco-config><!– Document Library config section –>   <config evaluator="string-compare" condition="DocumentLibrary" replace="true">      <tree>         <evaluate-child-folders>false</evaluate-child-folders>      </tree>    <!–         Used by the "Manage Aspects" action         For custom aspects, remember to also add the relevant i18n string(s)            cm_myaspect=My Aspect      –>      <aspects>         <!– Aspects that a user can see –>         <visible>            <aspect name="cm:generalclassifiable" />            <aspect name="cm:complianceable" />            <aspect name="cm:dublincore" />            <aspect name="cm:effectivity" />            <aspect name="cm:summarizable" />            <aspect name="cm:versionable" />            <aspect name="cm:templatable" />            <aspect name="cm:emailed" />            <aspect name="emailserver:aliasable" />            <aspect name="cm:taggable" />            <aspect name="app:inlineeditable" />      [b] <aspect name="my:typageDocument" />       <aspect name="my:etatDocument" />[/b]         </visible>         <!– Aspects that a user can add. Same as "visible" if left empty  –>         <addable>         </addable>         <!– Aspects that a user can remove. Same as "visible" if left empty –>         <removeable>         </removeable>      </aspects>      <!–         Used by the "Change Type" action         Remember to also add the relevant i18n string(s):            cm_mysubtype=My SubType      –>      <types>         <type name="cm:content">           [b] <subtype name="my:doc" />[/b]         </type>         <type name="cm:folder">            <subtype name="cm:myfoldersubtype" />         </type>      </types>   </config></alfresco-config>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

This works, except for the fact that when I change the type of a content by running a Change type action, some metadatas appear that I don't need and I have no idea where they come from. Here is a view of the metadatas for my:doc content :
http://picasaweb.google.fr/lh/photo/5m9cV4-POCKaopM0bXVazdgmsGC-6Zp_p98jYESTpys?feat=directlink
http://picasaweb.google.fr/lh/photo/dT3sBh9RwLsX3FPZtBSqpdgmsGC-6Zp_p98jYESTpys?feat=directlink

Do you have any idea why the properties like Node Identifier,Store Indentifier, Store Protocole, rn:rendition, Last date accessed, Initial version, etc… are shown ? Basically I just wanted to show the normal metadatas plus the properties my:client, mySmiley Tonguerojet, my:typ, my:nChrono and my:etat with the right labels ! Can you tell me if I followed the right procedure to configure my custom content model in Share, please ?


Thank you for your help.
2 REPLIES 2

mikeh
Star Contributor
Star Contributor
Make sure you also add a form for the <form id="doclib-simple-metadata">

Thanks,
Mike

spiegi
Champ in-the-making
Champ in-the-making
Hello,

I have the same problem like eos in CE 3.2r2
Can someone help me ?

Thanks,

Diana