Youuuuuhouuuuuuuuuuuuuuuuu I look at the src, with breakpoints everywhere, and the answer is to add "%enc:" before the expression of the label in the ODT. For exemple, for a repeated list of items, my expression became "%enc:m.getContent()".
Thanks for your help ! On 29 déc, 00:26, JMD <[email protected]> wrote: > lol the class TextLineBreak is empty > > On 29 déc, 00:21, JMD <[email protected]> wrote: > > > I found it but I really don't know how to use it in the > > template.setField(). Maybe i can try to modify the content.xml, but > > without an example... > > > On 28 déc, 23:58, J David Eisenberg <[email protected]> > > wrote: > > > > On Mon, Dec 28, 2009 at 1:04 PM, JMD <[email protected]> wrote: > > > > And how do I add this element ? > > > > I tried : > > > > List<Step> steps = new ArrayList<Step>(); > > > > Iterator<Step> iter = > > > > recette.getSteps().iterator(); > > > > while(iter.hasNext()) { > > > > Step myStep = iter.next(); > > > > > > > > myStep.setContent(myStep.getContent().replaceAll("\n", "<text:line- > > > > break>")); > > > > steps.add(myStep); > > > > } > > > > template.setField("steps", steps); > > > > > And in my ODT, I have "<text:line-break>" and not a new line :( > > > > To create true elements, don't you need to use a class like > > > org.jopendocument.model.text.TextLineBreak ? (I don't know; I haven't > > > used jOpenDocument much.) You're just putting a string into the > > > content; that doesn't create a real element.
