Generate document from template
PostPosted:Tue May 28, 2019 10:28 am
Hi,
I'm trying to generate a document from template when the worflow start.
I got the generated file but it's empty :/
all the template field value got replace by "". Don't really know where to start the debug.
If I create the document from the template by the user interface, I got all the field replaced.
I defined my metadata :
I'm trying to generate a document from template when the worflow start.
I got the generated file but it's empty :/
all the template field value got replace by "". Don't really know where to start the debug.
If I create the document from the template by the user interface, I got all the field replaced.
I defined my metadata :
Code: Select all
My template as the Template field value :
I use the code below to create the final document :
<property-group label="Fre" name="okg:fre">
<input label="Input label" name="okp:fre.input"/>
<textarea label="Comment" name="okp:fre.comment" />
<input label="Input label2" name="okp:fre.input2" />
<input label="Document" name="okp:fre.document" />
</property-group>
Code: Select all
Catalina log :
How the final document look like:
Any idea about my issue ? thanks !Map<String, String> map = new HashMap<String, String>();
map.put("okp_fre_Input2","Alicia");
List<Map<String,String>> lista = new ArrayList<>();
lista.add(map);
List<GWTFormElement> elementos = new ArrayList<>();
Map<String,List<Map<String,String>>> mapa = new HashMap<>();
mapa.put("okp_fre_Input2", lista);
DocumentServlet ds = new DocumentServlet();
GWTDocument file = ds.createFromTemplate("/okm:templates/PMGI_0_TE_07_TemplateFRE.odt", "/okm:root/finaldoc.odt", elementos, mapa);