Hi

I'll think about it. Actually the message I got when nesting clayForEach
tags was that Map was not supported, and that I should change it into a
List.

Med vennlig hilsen
Hermod Opstvedt
Webmaster
Seiling.org/Norlys.org


-----Opprinnelig melding-----
Fra: Gary VanMatre [mailto:[EMAIL PROTECTED] 
Sendt: 28. mars 2006 21:01
Til: Struts Users Mailing List; [EMAIL PROTECTED]
Emne: Re: SV: [Shale] ClayforEach and Maps

>From: Hermod Opstvedt <[EMAIL PROTECTED]> 
>
> Hi 
> 
> It suddendly struck me that what I described below might be the cause of a

> problem that I have been struggling with the last day. I have a page where
I 
> display results from a regatta. These results are group by classes. In
order 
> to do this I have a clayForEach tag where information about the class is 
> displayed for each row, and then a dataTable within that that displays the

> results for that class. I could not get this to work whatever combination
I 
> tried. I kept getting messages saying it could not find the property to 
> display in the dataTable column, and in the stacktrace it would refer to
the 
> Hibernate Persistant set instead of the item within the set. It was at
this 
> point I decided to nest a clayForEach instead. Which gave me the moaning 
> about the Map. Since this worked when I returned a List instead, I decided

> to try again with the dataTable, and behold it works! 
>

The clayForEach should handle maps but it uses the entrySet's iterator.  So,
your clay config's/templates would have to assume that the managed-bean-name
object is a Map.Entry ([EMAIL PROTECTED]).  It seemed like
a good idea at the time but if you would rather assume the
Map.Entry.getValue(), please create a bugzilla ticket for that one.

 
> Hermod 
> 

Gary

> -----Opprinnelig melding----- 
> Fra: Hermod Opstvedt [mailto:[EMAIL PROTECTED] 
> Sendt: 28. mars 2006 18:40 
> Til: 'Struts Users Mailing List' 
> Emne: [Shale] ClayforEach and Maps 
> 
> Hi 
> 
> I am currently converting one of my websites from Struts to 
> Shale/Hibernate3/Spring. One of the issues I have had recently is the 
> clayForEach non-support of Maps. I have many many2one relationships, and 
> these return Maps. So I have to convert my Maps into ArrayLists before 
> returning to the view. Is there any good reason as to why Maps are not 
> supported? 
> 
> Hermod 
> 
> 
> --------------------------------------------------------------------- 
> To unsubscribe, e-mail: [EMAIL PROTECTED] 
> For additional commands, e-mail: [EMAIL PROTECTED] 
> 
> 
> --------------------------------------------------------------------- 
> To unsubscribe, e-mail: [EMAIL PROTECTED] 
> For additional commands, e-mail: [EMAIL PROTECTED] 
> 


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

Reply via email to