<?xml version="1.0" encoding="UTF-8"?>
<!– Note: This model is pre-configured to load at startup of the Repository. So, all contrat –>
<!– types and aspects added here will automatically be registered –>
<model name="se:seModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>se 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 contrat.model should be changed to reflect your own
namespace –>
<namespaces>
<namespace uri="se.model" prefix="se"/>
</namespaces>
<aspects>
<!– Definition of new Content Aspect: Individu Details –>
<aspect name="se:Details">
<title>TITRE SE</title>
<properties>
<property name="se:Sites">
<title>Sites</title>
<type>d:text</type>
<constraints>
<constraint type="LIST">
<parameter name="allowedValues">
<list>
<value>A</value>
<value>B</value>
</list>
</parameter>
</constraint>
</constraints>
</property>
</properties>
<associations>
<association name="se:Enfants">
<source>
<role>cm:referencedBy</role>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>cm:content</class>
<role>se:Enfants</role>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
</aspect>
</aspects>
</model>
var listeSites = document.properties["se:Sites"];
var listeEnfants = document.properties["se:Enfants"];
document.assocs["se:Enfants"]
(voir http://wiki.alfresco.com/wiki/3.1_JavaScript_API#ScriptNode_API)
document.copy(cheminFinal);
document.move(cheminFinal);
là l'association est bien rempli.createAssociation(ScriptNode target, string assocType)
Creates a new target association to the specified node with the given association type QName.
<child-association name="se:Enfants">
<source>
<role>cm:referencedBy</role>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>cm:content</class>
<role>se:Enfants</role>
<mandatory>false</mandatory>
<many>true</many>
</target>
</child-association>
var fichier = companyhome.childByNamePath("Soc/Backup/Edit.txt");
document.createAssociation(fichier, "se:Enfants");
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.