Re: Still need help with layered Map iteration in JSP

2004-08-16 Thread Kris Schneider
It's certainly not a bad idea to grab a JSTL book, but the spec itself is quite readable and full of good information: http://jcp.org/aboutJava/communityprocess/final/jsr052/ The only JSTL book I've even partially read is "JSTL in Action" by Shawn Bayern and I have no reservations recommending it

Re: Still need help with layered Map iteration in JSP

2004-08-16 Thread Erik Weber
Kris, once again you have helped me get my work done. bean:size did the trick. I was looking over and over again for a JSTL tag or expression to do this; I probably never would have thought of bean:size. To complete the post for any other reader who is as suicidal as I am after trying to figure

Re: Still need help with layered Map iteration in JSP

2004-08-16 Thread Kris Schneider
I guess the first thing to make sure you understand is that, when iterating over a Map, the object exposed by JSTL via the var attribute is of type Map.Entry. It's equivalent to doing a map.entrySet().iterator(). As for getting the size of an array, Collection, or Map, use the tag. Quoting Erik W

Still need help with layered Map iteration in JSP

2004-08-16 Thread Erik Weber
OK, I'll take ANY WAY TO DO THIS AT ALL. I have a c:forEach over a Map. The value for each key in the Map can be an array of objects, or I can make it a List. I don't care at this point. All I want to do is get the length of this array or List, before I start iterating over *it*, during the curr

Re: Need help with layered Map iteration in JSP

2004-08-16 Thread Erik Weber
I have a c:forEach where "items" refers to a Map, and "var" refers to the current Map entry. The value for each Map entry is an array. How do I switch on the length of this array? I tried this: But I get a syntax error; it says I supplied the "." operator with an index value of type "java.la

Re: Need help with layered Map iteration in JSP

2004-08-13 Thread Erik Weber
Thanks again. Erik Kris Schneider wrote: supports a "varStatus" attribute. The value of that atrribute is a String that names an instance of javax.servlet.jsp.jstl.core.LoopTagStatus. The LoopTagStatus instance has nested visibility so that it's only available within the enclosing tag. LoopTagSta

Re: [OT] Need help with layered Map iteration in JSP

2004-08-13 Thread Curtis Taylor
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %> <%-- ${entry.key} is the current key --%> <%-- ${entry.value} is the associated bean array --%> See the API docs for the LoopTagStatus interface: http://tinyurl.com/542tw "Erik Weber" <[EMAIL PROTECTED]> wrote in

Re: Need help with layered Map iteration in JSP

2004-08-13 Thread Kris Schneider
supports a "varStatus" attribute. The value of that atrribute is a String that names an instance of javax.servlet.jsp.jstl.core.LoopTagStatus. The LoopTagStatus instance has nested visibility so that it's only available within the enclosing tag. LoopTagStatus exposes a number of properties, but t

Re: Need help with layered Map iteration in JSP

2004-08-13 Thread Erik Weber
How can I refer to the index of the current iteration with c:forEach (analogous to the indexId attribute to logic:iterate)? Thanks, Erik Kris Schneider wrote: <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %> <%-- ${entry.key} is the current key --%> <%-- ${entry.value} is the asso

Re: Need help with layered Map iteration in JSP

2004-08-13 Thread Erik Weber
Thanks! Erik Kris Schneider wrote: <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %> <%-- ${entry.key} is the current key --%> <%-- ${entry.value} is the associated bean array --%> ... Quoting Erik Weber <[EMAIL PROTECTED]>: I could use some Struts-EL/JSTL tag help, pleas

Re: Need help with layered Map iteration in JSP

2004-08-13 Thread Kris Schneider
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %> <%-- ${entry.key} is the current key --%> <%-- ${entry.value} is the associated bean array --%> ... Quoting Erik Weber <[EMAIL PROTECTED]>: > I could use some Struts-EL/JSTL tag help, please. > > I have a Map with eac

Need help with layered Map iteration in JSP

2004-08-13 Thread Erik Weber
I could use some Struts-EL/JSTL tag help, please. I have a Map with each entry having a String as the key and a bean array as the value. I need two iterations, one nested inside the other. For the outer iteration, I want to iterate the keySet of the Map. I don't know what the keys are going to b