You could create an abstractDefaultAjaxBehaviour in your page, then do an
ajax get onto it, appending your parameter as a url parameter, then get your
parameter from the request in java.  or you could have a wicket page, and do
an ajax get on that, appending your parameter as a url parameter, and get
your parameter from the page parameters.

Admittedly both ways seem a little hacky but i cant think of another way.


My presentation on google maps from the london wicket user group may be
helpful, as may the one about a gallery (not mine):
http://code.google.com/p/londonwicket/downloads/list

hope that helps




solled wrote:
> 
> Hi,
> 
> How do I get data generated by javascript functions to my Java code using
> Wicket. For example, I have the following javascript code:
> 
> <script type="text/javascript">
>  
>     var map;
>     var gdir;
>     var geocoder = null;
>     var addressMarker;
>     var mileage;
>       
>     function initialize() {
>       if (GBrowserIsCompatible()) {      
>         map = new GMap2(document.getElementById("map_canvas"));
>         gdir = new GDirections(map,
> document.getElementById("directions"));
>         GEvent.addListener(gdir, "load", onGDirectionsLoad);
>         GEvent.addListener(gdir, "error", handleErrors);
> 
>         setDirections("", "", "en_US");
>       
>         onGDirectionsLoad();
>       }
>     }
>     
>     function setDirections(fromAddress, toAddress, locale) {
>       gdir.load("from: " + fromAddress + " to: " + toAddress,
>                 { "locale": locale });
>     }
> 
>       function onGDirectionsLoad(){ 
>       // Use this function to access information about the latest load()
>       // results.
> 
>       document.getElementById("getDistance").innerHTML =
> gdir.getDistance().html; 
> 
>       }
>     </script>
> 
> 
> 
> How do I pass the getDistance value in function onGDirectionsLoad() to my
> java code?
> 
> thanks for any help.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-do-I-pass-back-data-from-HTML-%28javascript%29-to-my-Java-code-tp17868387p17868825.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to