cancel
Showing results for 
Search instead for 
Did you mean: 

Customize association in share?

dynamolalit
Champ on-the-rise
Champ on-the-rise
Hi,

I have below model in which ucsmusic:song is associated with multiple ucsmusic:record & ucsmusic:record can have multiple ucsmusic:song attached to it.


<types>  
      <!– Definition of new Content Type: UCS Music Object Type  –>
      <type name="ucsmusic:record">
         <title>UCS Music Record</title>
         <parent>cm:content</parent>
         <properties>
         <property name="ucsmusic:singer">
            <description>UCS Record Singer</description>
               <type>d:text</type>
            <mandatory>true</mandatory>
            </property>
         <property name="ucsmusic:album">
            <description>UCS Record Album</description>
               <type>d:text</type>
            <mandatory>true</mandatory>
            </property>
         <property name="ucsmusic:label">
            <description>UCS Record label</description>
               <type>d:text</type>
            <mandatory>true</mandatory>
            </property>
         <property name="ucsmusic:awards">
            <description>UCS Music Awards</description>
               <type>d:text</type>
            <mandatory>true</mandatory>
            <multiple>true</multiple>
            </property>
         </properties>      
       <associations>
            <child-association name="ucsmusic:association">
            <source>
                  <mandatory>true</mandatory>
                  <many>true</many>
            </source>
            <target>
                  <class>ucsmusic:song</class>
                  <mandatory>true</mandatory>
                  <many>true</many>
            </target>
            </child-association>
                 </associations>
      </type> 
    
     <type name="ucsmusic:song">
         <title>Song Object</title>
         <parent>cm:content</parent>
         <properties>
         <property name="ucsmusic:id">
            <description>Song Id</description>
               <type>d:int</type>
            <mandatory>true</mandatory>
            </property>
         <property name="ucsmusic:title">
            <description>Song Title</description>
               <type>d:text</type>
            <mandatory>true</mandatory>
            </property>
         <property name="ucsmusic:duration">
            <description> Song Duration</description>
               <type>d:int</type>
            <mandatory>true</mandatory>
            </property>
         </properties>             
      </type> 
   </types>

Now i want to render it on share in a way that when i click to create a ucsmusic:record type content, i can add n number of ucsmusic:song to it on share.

How can i do it?

Regards.
1 REPLY 1

lementree
Champ on-the-rise
Champ on-the-rise
Hi,

you can pass the startLocation parameter in association.ftl. so the object picker dirctly points to the location where u have ur custom content.
see:
http://wiki.alfresco.com/wiki/Forms#association.ftl.

If the files are at different location then you can write your custom object-finder.js that will query in background and show all the files.