AnsweredAssumed Answered

Add aspect on change of dropdown list

Question asked by davidh on May 24, 2012
Latest reply on Mar 10, 2016 by deeps
Hi,

Currently, we have a custom data model which includes one Type (cm:folder), which itself, contains one mandatory aspect. This aspect has a number of properties, one of which we use a constraint of 'List'. On the share-config-custom.xml, we use the control template of selectmany.ftl for that property with the constraint.
Now, our issue is, when the user is editing properties, and selects an item from that multi-select control, we want another aspect to appear within the edit properties page (i.e. they select an item in the list, which adds an aspect, allowing the user to fill in the properties of that other aspect before they leave that page, either by clicking cancel or Save).

In other words, rather than using a custom rule to add the aspect once the item in question has been updated, we want to add a aspect during the editing properties phase depending on what option the user has selected in the multi-select option.
e.g. Steps for what we want:
1/ Create a folder
2/ Change the folder type to 'Case' (our own Type - which has a mandatory aspect called 'Case Data')
3/ User edits the 'Case Data' properties of the folder, one of which is a multi-select option.
4/ The user selects the item 'Investigation Log' in the multi-select option
5/ (here is what we want to happen) The Investigation Log aspect is added allowing the user to fill in the properties without leaving the page.

I am fairly new to Alfresco and any help will be greatly appreciated.

Many Thanks
David

Outcomes