enum dynamic property values

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2013 09:16 AM
Hi all,
I have a situation where i need to populate the activiti:value dynamically. Is there a way I can generage the <activiti:value tags dymically based on an API call?
Please note that the generating the XML dynamically will not work for me because, the list values will be changing based on the user roles/permissions.
I am looking for something similar to this below:
Thanks,
Raj
I have a situation where i need to populate the activiti:value dynamically. Is there a way I can generage the <activiti:value tags dymically based on an API call?
Please note that the generating the XML dynamically will not work for me because, the list values will be changing based on the user roles/permissions.
<activiti:formProperty id="entityFindList_listbox_4" type="enum"> <activiti:value id="left" name="Go Left" /> <activiti:value id="right" name="Go Right" /> <activiti:value id="up" name="Go Up" /> <activiti:value id="down" name="Go Down" /> </activiti:formProperty>
I am looking for something similar to this below:
<activiti:formProperty id="entityFindList_listbox_4" type="enum" enumValues ="${serviceObj.getValues()}">
Thanks,
Raj
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2013 10:44 AM
I found the below userFormType configuration which is very useful and it works.
in spring context xml:
Is this the way to go?
Raj
in spring context xml:
<property name="customFormTypes">
<list>
<ref bean="dynamicEnum"/>
</list>
</property>
<!– Custom form types –>
<bean id="dynamicEnum" class="com.xxxx.xxxx.xxxxworkflow.business.impl.DynamicEnumFormType"/>
DynamicEnumFormType is a class which is extending AbstractFormType
Is this the way to go?
Raj
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2013 11:10 AM
Yes, this looks good. Does it work?
