• Post Reply Bookmark Topic Watch Topic
  • New Topic

jstl  RSS feed

 
jay roy
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys

I have something like this

<table>

<c:forEach var="docsummparty" items="${documentSummary.arrayList}" varStatus="DocPartycount">
<tr valign="top" bgcolor="#ffffff">
<td nowrap valign="top">


<cut value='${DocPartycount.count}'/>

</td>
</tr>
</c:forEach>
</table>



Now in the above code the line " <cut value='${DocPartycount.count}'/> " displays the count number like 1 or 2 or 3.
Now, Instead of displaying the numbers like 1 or 2 or 3 , i want to display a, b, c, d, ..and so on.

I want to know if thats possible

Any help will be greatly appreciated

thanks in advance
Jay
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would you convert 1,2,3 to a,b,c in a Java app? Start there and see if you can adapt it.
 
jay roy
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
exactly, i found the code to do that from this website
http://forum.java.sun.com/thread.jspa?threadID=5136303&messageID=9496507#9496507

here is the code:

public class CharGen
{
public static void main(String[] args)
{
for(int i=1;i<3;i++)
printAlphabet(i, "");
}

public static void printAlphabet(int depth, String prefix)
{
for (int i = 97; i<123; i++)
{
char c = (char)i;
if (depth > 1)
{
printAlphabet(depth-1, prefix+c);
}
else
{
System.out.println(prefix + c);
}
}
}

}




i guess my task now would be to represent the above code using jstl tags.

any ideas?
thanks
J
[ April 04, 2007: Message edited by: jay roy ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!