Dan Adams wrote:
> Thanks Bernard. Your template seems really straight forward. 

No problem :)

> The problem I having right now is that the block that is rendered is returned 
> via an
> ognl expression and the expression is only being evaluated once. Do you
> know a way around this?

I'm not sure if I got it right, are we talking about this particular
part of the template?

<!-- render recursively child groups -->        
<condition jwcid="@Conditional"
  condition="ognl:group.reportGroups.size() > 0">
   <loop jwcid="@Foreach" source="ognl:group.reportGroups"
      value="ognl:group" >
        <span jwcid="@RenderBlock" block="ognl:components.groupBlock"/>
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^?
   </loop>
</condition>

When Foreach is rendered the ognl expression in

<span jwcid="@RenderBlock" block="ognl:components.groupBlock"/>

is evaluated every time the RenderBlock gets rendered :) You can replace
it with a call to Java method and there return different blocks of your
choice.

I'm not sure if I understand what the problem really is. So you want
recursion or not :-) or you want block to change from time to time or
you neeed both?

Can you tell me what excactly are you trying to achieve and I may be
able to help?

Regards,
Bernard



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

Reply via email to