Is struts 1.1 having any logic to display html <ol> tags. My requirement is as follows:
I am having a collection of ListItem objects. This list item object contain 2 properties-
content and indent level. This indent level determines whether the item is at sublevel or not.
I have to iterate this collection and display a html ordered list. I am struck in this problem because i have to compare 2 items in collection always " nth and n-1 th items"(except the first one) and if the indent level difference is more than 0, i have to put that many <ol type="1"> tags and if the difference is <0, then i have to put that many </ol> tags. Can i do this in struts 1.1 using nested?
For example if my collection is having the following objects
Object Content Indent level
ListItem 0 Root item 0
ListItem 1 Item at level 1 1
ListItem 3 Item at level 2 2
ListItem 4 Second root item 0
ListItem 5 Third root item 1
My html output has to be
<ol type=a>
<li>Root item></li>
<ol type=1>
<li>Item at level 1</li>
<ol type=i>
<li>Item at level 2</li>
</ol>
</ol>
<li>
Second root item</li>
<li>
Third root item</li>
</ol>
This is the output to be generated. For this i have to arrive at the difference in indent level and add either </ol> or <ol > tags.
Can it be done in struts 1.1. Please help me
Thanks in advance
Regards
Sivajothi