If this is a valid way of using the <mm:aliaslist> i think it should be
mentioned in the documentation. Specially if it's THE way to iterate through
a list of params using the tagilib ..
Ernst

-----Oorspronkelijk bericht-----
Van: Michiel Meeuwissen [mailto:[EMAIL PROTECTED]]
Verzonden: maandag 10 februari 2003 17:36
Aan: [EMAIL PROTECTED]
Onderwerp: Re: Vote: HACK Import tag enhancement for mm:include


Pierre van Rooden <[EMAIL PROTECTED]> wrote:
> <mm:import externid="themes" vartype="Vector" jspvar="themevec" />
> 
> <% java.util.Iterator i = themevec.iterator(); while (i.hasNext()) { %>
> 
> <mm:node number="<%= (String)i.next()%>" id="other" />
> 
> <mm:createrelation role="selected" source="site" destination="other" />
> 
> <% } %>
> 
> 
> Nifty, eh?


Well, lets try this 'taglib only' just for the fun.

I suppose that the following (untested code) would perhaps do the same:

<mm:import externid="themes" vartype="list" />
<mm:aliaslist referid="themes">
   <mm:context>
     <mm:node number="$_" id="other" />
     <mm:createrelation role="selected" source="site" destination="other" />
   </mm:context>
</mm:aliaslist>

Even more nifty, perhaps, eh? :-)

 Michiel


-- 
mihxil'  Michiel Meeuwissen 
Mediapark C101 Hilversum  
+31 (0)35 6772979
[]() 

Reply via email to