What types of structures are you using on the java side? Arrays? Lists?
Custom objects ?
What do you want to display in VTL?
Let's say you put the articles in a list of lists of articles named
$articles in the context. IT would give something like:
#set($nb = 1)
#foreach($section in $articles)
--Section $velocityCount
#set($sec = $velocityCount)
#foreach($sub in $secion)
------SubSection ${sec}.$velocityCount
#foreach($art in $sub)
--------Article $nb
#set($nb = $nb + 1)
#end
#end
#end
Claude
Le mardi 05 décembre 2006 à 13:15 +0530, Verma, Abhishek (Abhishek V) a
écrit :
> Hi all,
> I am a new to velocity.
>
> I have a data structure in java like follow:-
>
> --Section 1
> ------SubSection1.1
> -----------Article 1
> -----------Article 2
> -----------Article 3
> ------SubSection1.2
> -----------Article 4
> -----------Article 5
> -----------Article 6
>
> --Section 2
> ------SubSection2.1
> -----------Article 7
> -----------Article 8
> -----------Article 9
> ------SubSection2.2
> -----------Article 10
> -----------Article11
> -----------Article 12
> ------SubSection2.3
> -----------Article 13
> -----------Article14
> -----------Article 15
>
> --Section 3
> ------SubSection3.1
> -----------Article 16
> ------SubSection3.2
> -----------Article 17
> -----------Article18
> -----------Article 19
> ------SubSection3.3
> -----------Article 20
>
>
> Now in the VTL i have to retreive these articles like the same structure
> Any help is appreciated
>
> ==Abhishek==
> Hewlett-Packard
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]