<model name="custom:customModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>Custom Model</description>
<author></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>
<!– Introduction of new namespaces defined by this model –>
<!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –>
<namespaces>
<namespace uri="custom.model" prefix="custom"/>
</namespaces>
<aspects>
<!– Definition of new Content Aspect: myAspect –>
<aspect name="custom:myAspect">
<title>My Aspect</title>
<properties>
<property name="custom:myAspect_ci">
<title>CI</title>
<type>d:int</type>
</property>
<property name="custom:myAspect_ca">
<title>CA</title>
<type>d:text</type>
</property>
<property name="custom:myAspect_ej">
<title>EJ</title>
<type>d:int</type>
</property>
<property name="custom:myAspect_no">
<title>NO</title>
<type>d:int</type>
</property>
</properties>
</aspect>
</aspects>
</model>
<alfresco-config>
…..
<!– Advanced Search in Alfresco Explorer –>
<config evaluator="string-compare" condition="Advanced Search">
<advanced-search>
<content-types>
</content-types>
<custom-properties>
<meta-data aspect="custom:myAspect" property="custom:myAspect_ci" />
<meta-data aspect="custom:myAspect" property="custom:myAspect_ca" />
<meta-data aspect="custom:myAspect" property="custom:myAspect_ej" />
<meta-data aspect="custom:myAspect" property="custom:myAspect_no" />
</custom-properties>
</advanced-search>
</config>
<!– Lists the custom aspect in business rules Action wizard –>
<config evaluator="string-compare" condition="Action Wizards">
<aspects>
<aspect name="custom:myAspect"/>
</aspects>
</config>
<!– Displays the properties in view details page –>
<config evaluator="aspect-name" condition="custom:myAspect">
<property-sheet>
<separator name="sepCust1" display-label="My Aspect" component-generator="HeaderSeparatorGenerator" />
<show-property name="custom:myAspect_ci"/>
<show-property name="custom:myAspect_ca"/>
<show-property name="custom:myAspect_ej"/>
<show-property name="custom:myAspect_no"/>
</property-sheet>
</config>
…..
</alfresco-config>
<alfresco-config>
…..
<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" />
<!– My aspects –>
<aspect name="custom:myAspect" />
</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>
…..
</alfresco-config>
<alfresco-config>
<!– cm:content type (existing nodes) –>
<config evaluator="node-type" condition="cm:content">
<forms>
<!– Default form configuration for the cm:content type –>
<form>
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
…..
<!– My Aspects –>
<show id="custom:myAspect_ci" for-mode="edit" force="true" />
<show id="custom:myAspect_ca" for-mode="edit" force="true" />
<show id="custom:myAspect_ej" for-mode="edit" force="true" />
<show id="custom:myAspect_no" for-mode="edit" force="true" />
</field-visibility>
<appearance>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
…..
<!– My Aspects –>
<field id="custom:myAspect_ci" mandatory="true">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="custom:myAspect_ca" mandatory="true">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="custom:myAspect_ej" mandatory="true">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="custom:myAspect_no" mandatory="true">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
</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" />
…..
<!– My Aspects –>
<show id="custom:myAspect_ci" for-mode="edit" force="true" />
<show id="custom:myAspect_ca" for-mode="edit" force="true" />
<show id="custom:myAspect_ej" for-mode="edit" force="true" />
<show id="custom:myAspect_no" for-mode="edit" force="true" />
</field-visibility>
<edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl" />
<appearance>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
…..
<!– My Aspects –>
<field id="custom:myAspect_ci" mandatory="true">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="custom:myAspect_ca" mandatory="true">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="custom:myAspect_ej" mandatory="true">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="custom:myAspect_no" mandatory="true">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</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" />
…..
<!–My Aspects –>
<show id="custom:myAspect_ci" for-mode="edit" force="true" />
<show id="custom:myAspect_ca" for-mode="edit" force="true" />
<show id="custom:myAspect_ej" for-mode="edit" force="true" />
<show id="custom:myAspect_no" for-mode="edit" force="true" />
</field-visibility>
<appearance>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
…..
<!– My Aspects –>
<field id="custom:myAspect_ci" mandatory="true">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="custom:myAspect_ca" mandatory="true">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="custom:myAspect_ej" mandatory="true">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="custom:myAspect_no" mandatory="true">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
</appearance>
</form>
</forms>
</config>
<!– cm:folder type (existing nodes) –>
<config evaluator="node-type" condition="cm:folder">
…..
</config>
…..
</alfresco-config>
## Data Dictionary
# Aspects
aspect.cm_complianceable=Armonizable
aspect.cm_dublincore=Dublin Core
…..
# My Aspects
aspect.custom_myAspect=myAspect
…..
# Display labels for Content Domain Model
…..
# My Aspects
custom_customModel.description=Custom Model
custom_customModel.aspect.custom_myAspect.title=MYASPECT
custom_customModel.aspect.custom_myAspect.description=My Aspect
custom_customModel.property.custom_myAspect_ci.title=CI
custom_customModel.property.custom_myAspect_ci.description=CI
custom_customModel.property.custom_myAspect_ca.title=CA
custom_customModel.property.custom_myAspect_ca.description=CA
custom_customModel.property.custom_myAspect_ej.title=EJ
custom_customModel.property.custom_myAspect_ej.description=EJ
custom_customModel.property.custom_myAspect_no.title=NO
custom_customModel.property.custom_myAspect_no.description=NO
Cuando dices que no ha funcionado, podrías describir un poco más el comportamiento esperado (y que no sucede) o el error que se genera?
Bueno, pues el problema estaba en que Share no es capaz de presentar metadatos asociados a un aspecto. Sólo presenta (tanto para la visualización como para la edición) aquellos que están definidos dentro de un tipo de contenido. Es una pena, pero de momento es la única solución que he encontrado para que funcione.
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.