That, or just add @Cached to getItems.

-Filip

On 2008-07-21 20:48, Howard Lewis Ship wrote:
Yes, and perhaps adding a SetupRender render phase method to setup a
temporary list with the values to iterate over.

On Mon, Jul 21, 2008 at 10:42 AM, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:
Hi,

On 2008-07-21 17:49, margi wrote:
That's what I did finally! You're right about the fact that we're not
supposed to have logic in template, but personnaly I think  there as some
logics that don't worth a Getter. Imagine if my list contains 10 elements
through which I have to iterate, I'd be oblige to write 10 getters, I
really
think that it's cumbersome. I might be wrong on this point if there is an
elegant solution to that problem.
Java:

 @Property
 private Item item;

 public List<Item> getItems() {
   return ...;
 }

Template:

 <t:loop t:source="items" t:value="item">
   <!-- do whatever you want with ${item} -->
 </t:loop>


That's how you'd iterate through a list.

-Filip

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to