Re: BTemplate 2 Iterations
"Diez B. Roggisch" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, > What is the best way to get the data of the Group Row into the > template? The trick is to introduce two iterative template models, RowModel and ColumnModel. These two interact. Whenever RowModel (which is the "outter" one) is told to fetch a new row, it sets this row (and the column data it conatains) to the inner ColumnModel. The html then looks like this: <table> <tr class="Dir::Iterate_Start.RowModel Dir::Iterate_Next:RowModel"> <td class="Dir::Iterate_Start.ColumnModel Dir::Iterate_Next.ColumnModel><span class="Dir::Get_Data.ColumnModel.somevalue"/></td class="Dir::Iterate_End.ColumnModel Dir::Discard"/> <tr class="Dir::Iterate_End.RowModel Dir::Discard"> </table> If the mailinglist archives are searchable, you can search for parent and child model or similar keywords, that subject has been covered in greater detail before. Diez