I am displaying the values in a TreeMap using forEach tag.
However, I only want to do this if the map is not empty.
I also need to display the count of entries in the map at
the top of the page.

In TreeMap, size/size() is not a Bean Property (no?) so I tried
in-line subclassing to expose the property:

<%
  TreeMap treeMap = new TreeMap() {
      public int getSize(){return size();}
    };
  pageContext.setAttribute("TableRows",treeMap);
%>

now much later I try:

<TD>
Search Results:&nbsp;<c:out value="${TableRows.size}"/>&nbsp;found.
</TD>

I could just count things as they are added to the map
over a series of SQL queries, but it seemed to me this
was the better solution.. only the EL expression is null.

I'm sure I'm doing something wrong....

Thanks

Roy


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to