I’m working on my first web app, and I’m using gwt to build it.
This app implements external hand-written JavaScript Code (which I’m not familiar with).
Well, I need to set a String variable within Java and pass it to a JavaScript Object.
the interesting part of my html looks like:
<script type="text/javascript"> var b = new Browser({
containerID: "TheApp",
Data: Info,
bookmark: bookmarkCallback,
dataPath:"pathToData/"
}); </script>
And now, I would like to set the dataPath in Java and pass it over to “pathTOData”
How exactly could i do it?
Thanks in advance for your help
For accessing string info you can use Dictionary class it is allowing you to access to external JS objects defined on host page.
But your case and object is more complex, so most likely you will have to use JSNI and JavaScript Overlay Types