commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus Crafter <craft...@managesoft.com>
Subject Re: [Jelly] xml:forEach, core:forEach and varStatus?
Date Wed, 12 Nov 2003 14:37:45 GMT
Hi All,

On Wed, 2003-11-12 at 09:22, Paul Libbrecht wrote:
> It is easy to make the same loop with an j:for I think:
> 
> <x:set var="myNodes" select="$elt//xyz"/>
> <j:forEach items="${myNodes}" var="node">
> 	....</j:forEach>
> 

Sure, as the context is shared, it makes sense.

> To get explore these kinds of things, you simply attempt to go a bit 
> deeper in the java "realities" behind Jelly (which is really 
> java-hooked) using something like <j:log>${myNodes.getClass()}</j:log> 
> and so on...
> In this case, you should have gotten a java.util.List.
> 
> Tell me if it works for you.

Yep - Using j:forEach with the results of an XPath select, rather than
x:forEach, allowed me to make use the varStatus attribute fine.

Thanks muchly for your help mate! :)

Cheers,

Marcus

-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   ManageSoft GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'
          &&&&.
    &&&&&&&:



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message