-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Template Rendering
-
Tags:
-
Team:PLATFORM
-
Sprint:nxplatform 11.1.21
-
Story Points:3
Add the possibility to contribute a complexe structure as templateParam. For instance:
<fields xmlns:dt="http://www.nuxeo.org/DocumentTemplate"> <dt:field name="account" type="Map"> <dt:field name="owner" type="Map"> <dt:field name="firstname" type="String" value="Benjamin"/> <dt:field name="lastname" type="String" value="JALON"/> </dt:field> <dt:field name="type" type="String" value="checking"/> <dt:field name="operations" type="list"> <dt:field name="op1" type="Map"> <dt:field name="date" type="Date" value="2017-07-14 13:14:15.678"/> <dt:field name="value" type="String" value="$ 200.20"/> <dt:field name="isPositive" type="Boolean" value="true"/> </dt:field> <dt:field name="op2" type="Map"> <dt:field name="date" type="Date" value="2017-07-15 13:10:15.678"/> <dt:field name="value" type="String" value="-$ 40.27"/> <dt:field name="isPositive" type="Boolean" value="false"/> </dt:field> </dt:field> </dt:field> </fields>
And so the following FTL template filled:
Hello ${account.owner.firstname} ${account.owner.lastname}, Here are the operations of the account ${account.number} for this month: DATE | VALUE | IS POSITIVE <#list account.operations as operation> ${operation.date?datetime} | ${operation.value} | ${operation.isPositive?string("yes", "no")} </#list>
- is duplicated by
-
NXP-27936 Support more input types for Template Rendering
- Resolved
- is related to
-
NXDOC-2150 How to Allow Map and List in Nuxeo Platform Rendering templateParam
- Resolved