Forum Discussion
FICO
13 years agoCommunity Manager
RMA - Generic Recursive Template
RMA - Generic Recursive Template In the RMA there is a way to expose your object model to allow the users to add condition's to each rule they create by drilling down into the object model. I have ...
FICO
13 years agoCommunity Manager
You have to work around circular references by adding an "uneccesary" extra level of template. Eg. you design it something like this:
TopLevelPropertiesTemplate (Here you select the initial class):
classVH [Exactly 1]: Classes provider
propertyVH [Exactly 1]: Class properties provder,
propertyClass [Exactly 1]: Property Type Provider (dynamic argument override: classVH, propertyVH),
subProperty [0 or 1]: SubPropertyTemplate1 (dynamic argument override: propertyClass)
SubPropertyTemplate1 (recursive template):
parentClass [single argument]: Class provider (count: single Argument)
propertyVH [Exactly 1]: Class Properties provider (dynamic argument override: parentClass)
propertyClass [Exactly 1]: Property Type Provider (dynamic argument override: parentClass, propertyVH)
subProperty [0 or 1]: SubPropertyTemplate2 (dynamic argument override: propertyClass)
SubPropertyTemplate2 (recursive template):
parentClass [single argument]: Class provider (count: single Argument)
propertyVH [Exactly 1]: Class Properties provider (dynamic argument override: parentClass)
propertyClass [Exactly 1]: Property Type Provider (dynamic argument override: parentClass, propertyVH)
subProperty [0 or 1]: SubPropertyTemplate1 (dynamic argument override: propertyClass)
This will not take care of properly avoiding exposing subproperties templates when it's a simple type, for that you probably need to create a conditional block in each template checking the propertyClass string against simple type strings. Or maybe theres a smarter way to do it by utilizing the properties filter functionality of the Class properties provider, and/or restructuring the templates.
Related Content
Related Content
- 0Views0likes3Comments