Hi
I am trying to iterate through the values of a Hashtable hotspots... below
is the code that i am using to do this. I have floorplan in session scope
and floorplan.getHotSpots() returns the hot spots. I know that i need to
have HotSpotInfo bean in page scope but i am not sure that i am doing it
right. kindly tell me what my mistake is. thanks in advance
<%@page import="com.data.HotSpotInfo" %>
.....
<%
{
/// this is just a place holder in order to set hotspot in page scope.
this is not the actual value in iteration...i know that this is not the
right way to do it.
HotSpotInfo hotspot = new HotSpotInfo(2, 400, 400, 30, 70, "green","");
pageContext.setAttribute("hotspot", hotspot, PageContext.PAGE_SCOPE);
}
%>
.....
<logic:iterate collection="<%= floorplan.getHotSpots() %>" id="hotspot"
type="com.data.HotSpotInfo">
The top is <bean:write name="hotspot" property="top" />
The width is <bean:write name="hotspot" property="width" />
The height is <bean:write name="hotspot" property="height" />
The left is <bean:write name="hotspot" property="left" />
</logic:iterate>
i find that it doesnt iterate thro the collection and only prints the single
value i created earlier in the page.