Re: Bunch of issues...
Jason Carreira <[email protected]>
| Newsgroups | gmane.comp.java.open-symphony.webwork |
|---|---|
| Message-ID | <19089880.1145307500045.JavaMail.os-j2ee@opensymphony01.managed.contegix.com> |
> 4) What's wrong with the following?
>
> In java:
>
> public List<CommissionReport> getReports()
> public double getTotal(List<CommissionReport>
> reports)
>
> <ww:set name="reports" value="getReports('youmomma')"
> />
> <ww:iterator value="#reports">...do
> Stuff</ww:iterator>
> <ww:property value="getTotal(#reports)" />
I'm surprised this works at all, since your getReports() method definition in Java doesn't take a parameter...
for the last bit, try:
<ww:property value="getTotal(reports)"/>
assuming that your getReports() method doesn't take a parameter, or
<ww:property value="getTotal(getReports('youmomma'))"/>
if it really does. This should keep the values from going through the tags and weird things happening to them. I'm not sure exactly where that list is converted to Strings, but you'd at least cut some opportunities for weirdness out if you keep it in Ognl. The problem, of course, is type erasure in the lovely JDK1.5 generics, so at runtime a List is a List.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=26282&messageID=51720#51720
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]