Hello! I am using a javascript plug in which is giving me the coordinates of a user. After the coordinates are retrieved, i want tapestry to reload a specific element - my list (which now should show localized entries) What i have done so far - and what is working - is that my js script is calling my java function onGetGroupsOnLocation(), taking the JSONArray and writing out that JSONArray via javascript document.getElementById("list").innerHTML=list;
BUT this is not what i want. I would prefer that I can reload the area <t:grid source="list" /> of my tml. So what i am looking for is a way to update a specific area of my tml, if a tapestry function of my page is invoked. I am happy for any help.. public JSONArray onGetGroupsOnLocation(){ Double lat = Double.parseDouble( request.getParameter("lat") ); Double lng = Double.parseDouble( request.getParameter("lng") ); Double radiusInMeters = Double.parseDouble( request.getParameter("radius") ) / 2; Geometry location = GeometryService.getPolygon(new GeoPoint(lat, lng), radiusInMeters.intValue()); groups = groupService.getGroupsOnLocation(location); JSONArray jsGroups = new JSONArray(); for(Group group : groups){ JSONObject jsGroup = group.toJSON(); jsGroup.put("lat", group.getScope().getCentroid().getY()); jsGroup.put("lng", group.getScope().getCentroid().getX()); jsGroups.put(jsGroup); } return jsGroups; } -- View this message in context: http://tapestry.1045711.n5.nabble.com/javascript-and-tapestry-reloading-a-list-tp5713535.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