You'll probably want to use the Script template ability in tapestry to do
this. See http://tapestry.apache.org/tapestry4.1/UsersGuide/script.html
Google maps has been integrated into tapestry at least once already that I
know of.
http://opencomponentry.com:8080/tacos/app?page=tests%2FMaps&service=page
Of course, there still isn't a visible tacos release for this yet so you'd
have to grab it from trunk.
On 7/8/06, glanzel <[EMAIL PROTECTED]> wrote:
hi
i got a question on how to add javascript to tapestry.
i try to add an google maps site to my webapplication,
and therefor i need to generate an javscript array from tapestry. my
idea - because i found nothing better - was to
generate javascript sourcecode inside in Java an then add this javscript
code to the html page.
like this:
public class GhotspotMap extends BasePage{
String address;
public GhotspotMap(){
getHotspotData();
}
public void getHotspotData() {
Vector<Nas> gm = Model.getModel().getAllNas();
for (int i = 0; i < gm.size();i++){
Nas nas = gm.get(i);
String jstring = "points["+i+"] = "+nas.street+"
"+nas.number+" "+nas.postalCode;
Body body = (Body) this.getBody();
body.addBodyScript(jstring);
}
}
}
but for some resons i didnt even get a Body Object from the BaseBage.
(because getBody return IRender Objects)
can you tell me if my way to gut javascript to the html page could work,
and maybe how,
or which is the right way to add an javascript array read from the
database?
thanks a lot - grischan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Jesse Kuhnert
Tacos/Tapestry, team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.