AnsweredAssumed Answered

Form control for multiple association on aspect reference

Question asked by 4535992 on Apr 10, 2019
Latest reply on Apr 14, 2019 by roberto.gamiz

Hi i need to emulate the dialog show from the action "manage-aspects" , on a field form control on Alfresco Share.

 

My point is to make the user select a list of aspect and send that list to the java backend service code with the post of the from and in that moment i use the aspects selected from the user for making things on the java code.

 

I have tried to emulate the  Multiple association with person nodes

(you can find a example on this project GitHub - angelborroy/alfresco-controls: Samples for Alfresco Share controls )

 

This is a simple model:

 

<?xml version="1.0" encoding="UTF-8"?>
<model name="up:testModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

 

    <description>eeeee</description>
    <author>eeeeeeeeeeeeee</author>
    <published>eeeeeeeeee</published>
    <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"/>
         <!-- Import Alfresco Data List Model Definitions -->
         <import uri="http://www.alfresco.org/model/datalist/1.0" prefix="dl"/>
    </imports>

 

    <namespaces>
        <namespace uri="extension" prefix="up"/>
    </namespaces>
    
    <aspects>
        <aspect name="up:test">
            <title>Test</title>
            <properties>
                <property name="up:testMultipleText">
                  <title>testMultipleText</title>
                  <type>d:text</type>
                  <multiple>true</multiple>
                  <index enabled="true">
                    <atomic>true</atomic>
                    <stored>false</stored>
                    <tokenised>false</tokenised>
                  </index>
                </property>
             </properties>
            <associations>
                <association name="up:testMultipleAssociation">
                    <title>testMultipleAssociation</title>
                    <source>
                        <mandatory>false</mandatory>
                        <many>true</many>
                    </source>
                    <target>
                        <class>cm:content</class>
                        <mandatory>false</mandatory>
                        <many>true</many>
                    </target>
                </association>
            </associations>
            <overrides></overrides>
            <mandatory-aspects></mandatory-aspects>
        </aspect>
    </aspects>

 

</model>

 

I need to save  a list of name of the aspects or a list of associations to the aspects on the post of the form.

 

Anyone have already done this?

 

Greetings.

Outcomes