tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrea Chiumenti" <kium...@gmail.com>
Subject Re: <foreach> In scriptDTD
Date Fri, 18 May 2007 10:39:00 GMT
?????????

try this:
<input-symbol key="mapPlotPoints" class="Java.util.List" required="no"/>
var varCapArray = new Array(${mapPlotPoints.size()});
<foreach expression="mapPlotPoints" key="item" index="count">
   varCapArray[count] = {caption: '${item.caption}', lat: ${item.lat},
longi: ${item.longi}};
</foreach>

or

<input-symbol key="mapPlotPoints" class="Java.util.List" required="no"/>
var varCapArray = new Array();
<foreach expression="mapPlotPoints" key="item" index="count">
   varCapArray.push( {caption: '${item.caption}', lat: ${item.lat},
longi: ${item.longi}} );
</foreach>

ciao,
kiuma
On 5/17/07, Kushan Jayathilake <kushanxp@gmail.com> wrote:
>
> Hi
>
> Im sorry previous mail contains wrong information. Please refer this one
>
>
> I have an abstract method calls
> Public abstract List<MapPlotPoint> getMapPlotPoints();
> MapPlotPoint class contains getters and setters of following objects
> Private Double lat;
> Private Double longi;
> Private String caption;
> Private ILink link;
>
>
> I added that to Map like this
> Map symbols = new HashMap();
> Symbols.put("mapPlotPoints", getMapPlotPoints());
> Below codings appear in my script DTD
> <input-symbol key="mapPlotPoints" class="Java.util.List" required="no"/>
> <foreach expression="mapPlotPoints" key="item" index="count">
>     Var varCap = ${item.caption};
> </foreach>
>
> I want to get lat,longi,caption and link value of all the instances of
> MapPlotPoint class to the javascript
>
> Please help me
> Kushan Jayathilake
> Member - Java Community Process (http://jcp.org)

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


Mime
View raw message