cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Hoskens" ...@schaubroeck.be>
Subject [More Detailed/Workaround] [Woody] Repeater in TemplateTransformer
Date Fri, 23 Jan 2004 09:05:12 GMT
I ran some more tests and now I think I've isolated the problem better (still using cvs head
cocoon 2.1, last updated 22 januari):

If I use a repeater and in that repeater use some textnodes, they allways end up at the front
of the generated block, and this once:

<repeater>
    text1
    <widget/>
    textbetween
    <widget/>
    textafter
</repeater>

this ends up in:
    text1 textbetween textafter
    <output from widgets>

If I create an extra element that surrounds the whole inner structure of the repeater, all
ends up nice:
<repeater>
    <surround>
        text1
        <widget/>
        textbetween
        <widget/>
        textafter
    </surround>
</repeater>

ends up in (correctly):
<!--repeated piece:-->
text1 <widget result> textbetween <widget2result> textafter
<!--end repeated piece-->

So I just use a dummy element to surround everything in my repeater!

Cheers,

Jan
  ----- Original Message ----- 
  From: Jan Hoskens 
  To: users@cocoon.apache.org 
  Sent: Thursday, January 22, 2004 4:30 PM
  Subject: [Woody] Repeater in TemplateTransformer


  Hi,

  I'm using a repeater in my template to display several rows and with each row I want to
add some static text. My layout gets messed up when I have the following:


       <wt:repeater-widget id="test">
            test: <wt:widget id="nr"/>static text in between <wt:widget id="text"/><br/>
       </wt:repeater-widget>

  For some strange reason, I get the following output:

  <snip>
  static text in between test: 4 test4
  test: 2 test2
  </snip>

  So every bit of static text that's in between my widgets is only printed once and in front
of everything!

  I do think it should be possible to do this!

  Greetings,

  Jan
Mime
View raw message