cancel
Showing results for 
Search instead for 
Did you mean: 

Access to aspect association via java script

akudinov
Champ in-the-making
Champ in-the-making
Hello

I have aspect with association like this:


<aspect name="control:control">
         <title>Control</title>
         <properties>
            <property name="control:resolution">
               <title>Resolution</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
         </properties>
         <associations>
            <association name="control:responsible-persons">
               <title>Responsible person</title>
                                         <source>
                                            <mandatory>false</mandatory>
                                            <many>true</many>
                                         </source>
                <target>
                  <class>cm:person</class>
                  <mandatory>false</mandatory>
                  <many>false</many>
                 </target>
            </association>
      </associations>
      </aspect>

If I want an access to document aspect simple properties - I use:
document.properties["control:resolution"]

But I want to access aspect association, for example username of person.

Can you help me ?

Thank you
2 REPLIES 2

mikeh
Star Contributor
Star Contributor
Did you try
document.assocs["control:responsible-persons"]
..?

More info here: http://wiki.alfresco.com/wiki/3.4_JavaScript_API

Thanks,
Mike

krups
Champ in-the-making
Champ in-the-making
thank you
It helped me