I expect count to be of type MapEntry or in case getCounts() returns 
cnts.values() instead it has to be of type string?

Jens

Sent from my iPhone

On 03.08.2012, at 02:40, "Angelo C." <angelochen...@gmail.com> wrote:

> Hi,
> 
> I'm trying to iterate a map in template with following code, but, it turns
> out that the entire map is only one row, I'm sure I have made something
> wrong, can anybody point it out? Thanks,
> 
> template:
> 
>  <t:loop source="counts" value="count">
>            <p>${count}</p>
>        </t:loop>
> code:
> 
> @Property
> private Map<Integer, String> count;
> 
> @Cached
> public Map<Integer, String> getCounts() {
>  return cnts;
> }
> 
> private static TreeMap<Integer, String> cnts = new TreeMap<Integer,
> String>();
> static {
>  cnts.put(1, "ITEM1");
>  cnts.put(2, "ITEM2");
> }
> 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Iterating-a-map-in-template-tp5715010.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to