Browse files

ported GMap2 and openlayers to Wicket 6, I'm not in the position to t…

…est this, so it could still be broken
  • Loading branch information...
1 parent bcf0e62 commit 41cc282c3b2d99ea1ba29327439bfe0901001b04 @papegaaij papegaaij committed Apr 28, 2012
View
4 jdk-1.6-parent/gmap2-parent/gmap2/src/main/java/wicket/contrib/gmap/api/GClientGeocoder.java
@@ -60,9 +60,9 @@ public abstract void onGeoCode(AjaxRequestTarget target, int status, String addr
GLatLng latLng);
@Override
- protected CharSequence generateCallbackScript(CharSequence partialCall)
+ public CharSequence getCallbackScript()
{
- return "Wicket.geocoder.getLatLng('" + getCallbackUrl() + "', '" +
+ return "Wicket.geocoder.getLatLng('" + getCallbackFunction("status", "address", "point") + "', '" +
addressField.getMarkupId() + "');" + "return false;";
}
}
View
19 jdk-1.6-parent/gmap2-parent/gmap2/src/main/java/wicket/contrib/gmap/wicket-gmap.js
@@ -32,7 +32,7 @@ Wicket.geocoder = new WicketClientGeocoder();
function WicketClientGeocoder(){
this.coder = new GClientGeocoder();
- this.getLatLng = function(callBackUrl, addressId){
+ this.getLatLng = function(callBackFunction, addressId){
var address = Wicket.$(addressId).value;
@@ -46,14 +46,7 @@ function WicketClientGeocoder(){
coordinates = response.Placemark[0].Point.coordinates;
}
- wicketAjaxGet(callBackUrl + '&status=' + status + '&address=' + address +
- '&point=(' +
- coordinates[1] +
- ',' +
- coordinates[0] +
- ')', function(){
- }, function(){
- });
+ callBackFunction(status, address, '('+coordinates[1] + ',' + coordinates[0] + ')');
});
}
}
@@ -74,13 +67,7 @@ function WicketMap2(id){
params['currentMapType'] = this.getMapTypeString(this.map.getCurrentMapType());
params['infoWindow.hidden'] = this.map.getInfoWindow().isHidden();
- for (var key in params) {
- callBack = callBack + '&' + key + '=' + params[key];
- }
-
- wicketAjaxGet(callBack, function(){
- }, function(){
- });
+ Wicket.Ajax.ajax({'u':callBack, 'ep': params});
}
this.addListener = function(event, callBack){
View
2 ...-parent/openlayers/src/main/java/org/wicketstuff/openlayers/api/IJavascriptComponent.java
@@ -15,8 +15,8 @@
*/
package org.wicketstuff.openlayers.api;
-import org.apache.wicket.IClusterable;
import org.apache.wicket.request.resource.JavaScriptResourceReference;
+import org.apache.wicket.util.io.IClusterable;
import org.wicketstuff.openlayers.IOpenLayersMap;
/**
View
2 .../openlayers-parent/openlayers/src/main/java/org/wicketstuff/openlayers/api/layer/WFS.java
@@ -19,8 +19,8 @@
import java.util.List;
import java.util.Map;
-import org.apache.wicket.IClusterable;
import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.util.io.IClusterable;
import org.wicketstuff.openlayers.js.JSUtils;
/**
View
5 jdk-1.6-parent/pom.xml
@@ -26,6 +26,7 @@
<module>datatables-parent</module>
<module>flot-parent</module>
<module>gae-initializer-parent</module>
+ <module>gmap2-parent</module>
<module>googlecharts-parent</module>
<module>htmlcompressor-parent</module>
<module>inmethod-grid-parent</module>
@@ -37,6 +38,7 @@
<module>mbeanview-parent</module>
<module>minis-parent</module>
<module>modalx-parent</module>
+ <module>openlayers-parent</module>
<module>phonebook</module>
<module>plugin</module>
<module>portlet-parent</module>
@@ -58,18 +60,17 @@
<module>wicketstuff-springreference-parent</module>
<module>wicket-security-parent</module>
+
<!-- TODO: port these module to wicket 6 -->
<!-- <module>calendarviews-parent</module> -->
<!-- <module>client-and-server-validation</module> -->
<!-- <module>eidogo-parent</module> -->
- <!-- <module>gmap2-parent</module> -->
<!-- <module>jasperreports-parent</module> -->
<!-- <module>theme-parent</module> -->
<!-- <module>mootools-meiomask-parent</module> -->
<!-- <module>objectautocomplete-parent</module> -->
- <!-- <module>openlayers-parent</module> -->
<!-- <module>shiro-security</module> -->
<!-- <module>yav-parent</module> -->

0 comments on commit 41cc282

Please sign in to comment.