cancel
Showing results for 
Search instead for 
Did you mean: 

how to create new data type in datadictionarymodel

yogeshkumar
Champ in-the-making
Champ in-the-making
Hi,

Is it possible to create new datatype? like d:list which maps to java.util.ArrayList

if possible please let me know what are all the steps i should proceed

thanks
yogeshkumar
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
Yes its possible.   However alfresco already has support for multi-valued fields and If you pass in an ArrayList then it will handle that as a collection.

If you really need a list type, look at how alfresco handles MLText values to persist the values to and from database format.     And in the extreme case you can persist any serializable java object.

yogeshkumar
Champ in-the-making
Champ in-the-making
Hi,

Thanks for your reply..

Yes its possible. However alfresco already has support for multi-valued fields and If you pass in an ArrayList then it will handle that as a collection.

[Yogesh] : If i want to pass any collection object ,in the property of my Aspect what datatype i should pass?

Example :

<aspect name="myaspectname">
         <title>SDXProject</title>
         <properties>
            <property name="mypropertyname">
               <type>d:text</type> [What datatype should i pass here?]
              </property>
</properties>
</aspect>

mrogers
Star Contributor
Star Contributor
Something like …

<aspect name="myaspectname">
<title>SDXProject</title>
<properties>
<property name="mypropertyname">
<type>d:text</type>
<multiple>true</multiple>
</property>
</properties>
</aspect>