cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic list property

narrowengineer
Champ in-the-making
Champ in-the-making
Is it possible to create a property which renders as a dropdown box and contains a list of values which is dynamically populated when the task is opened?

What I want to do is be able to provide a list of possible folders in which to copy the associated document to when the workflow completes.

I have not been able to find anything documented around dynamic list properties.

Thanks
5 REPLIES 5

claudio_martins
Champ in-the-making
Champ in-the-making
You need to implement a Constraint:

http://wiki.alfresco.com/wiki/Constraints

narrowengineer
Champ in-the-making
Champ in-the-making
I see that I can add a LIST contraint but how would I go about setting the allowed values via script?

claudio_martins
Champ in-the-making
Champ in-the-making
If you need dynamic values on your list, you need to implement the following interface:

org.alfresco.service.cmr.dictionary.Constraint

or extend

org.alfresco.repo.dictionary.constraint.AbstractConstraint

Have a look at the following section:

http://wiki.alfresco.com/wiki/Constraints#Writing_Further_Constraints

narrowengineer
Champ in-the-making
Champ in-the-making
Ok, so I need to write a Java class to do it.  Is there no way to do it otherwise?

claudio_martins
Champ in-the-making
Champ in-the-making
AFAIK, you can only have dynamic lists implement the above mentioned interface and class.


Cheers, CM.