Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-27936

Support more input types for Template Rendering

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 9.10
    • Fix Version/s: None
    • Component/s: Template Rendering

      Description

      Currently only 6 types are supported: https://github.com/nuxeo/nuxeo/blob/master/addons/nuxeo-template-rendering/nuxeo-template-rendering-api/src/main/java/org/nuxeo/template/api/InputType.java#L33

      It would be nice to support more complex structures, as in the example below.

      Implementing that would be useful to marshall the templateData property which is used when building parametrized templates.

       

      Example of what could be supported:

      • XML for templateData
        <nxdt:templateParams xmlns:nxdt="http://www.nuxeo.org/DocumentTemplate">
           <nxdt:field name="field1" type="String" value="boubou"></nxdt:field>
           <nxdt:field name="field2" type="String" value="bibi"></nxdt:field>   <nxdt:field name="field3" type="Object" value=[{key1: 'boubou', key2: 'bibi'}, {key1: 'toto', key2: 'tata'}, ...]></nxdt:field></nxdt:templateParams> 
      • use in a JXLS template
        <jx:forEach items="${field3}" var="input">
        
          input.key1 | input.key2 | input.key3 | 
        
        </jx:forEach> 

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: