cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Aspect Display

hogarth503
Champ in-the-making
Champ in-the-making
Hi
I created a Custom aspect with 20 properties, some are required to be a drop down box with names to be selected
would some please post some code as how to do the drop down .. Aslo is it possible to display the poeperties into column instead of all 20 listed below each other..

Example …..

Prop1           Prop2 (drop down list)  
prop3           prop4
prop5           prop6 (drop down list)

Thanks in advance for any help
1 REPLY 1

peds
Champ in-the-making
Champ in-the-making
One way to make dropdowns is to make set a list constraint. Check this out: http://wiki.alfresco.com/wiki/Constraints

Specifically, you're going to want something like this:
<constraint name="test:list1" type="LIST">
        <parameter name="allowedValues">
            <list>
                <value>ABC</value>
                <value>DEF</value>
            </list>
        </parameter>
        <parameter name="caseSensitive"><value>true</value></parameter>
     </constraint>

and this:
 <property name="test:prop1">
              <type>d:text</type>
              <protected>true</protected>
              <default></default>
              <constraints>
                 <constraint ref="test:list1"/>
              </constraints>
           </property>

in your content model. There's also a way to do inline constraints where the list is just in the property definition.

Ben