Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package wicket.contrib.gmap.api;
 
 import  org.apache.wicket.Component;
 import  org.apache.wicket.ajax.AjaxEventBehavior;
 import  org.apache.wicket.ajax.AjaxRequestTarget;
 import  org.apache.wicket.ajax.attributes.CallbackParameter;
 import  org.apache.wicket.markup.head.IHeaderResponse;
 import  org.apache.wicket.markup.html.form.TextField;
 import  org.apache.wicket.request.IRequestParameters;
import  org.apache.wicket.request.Request;
import  org.apache.wicket.request.cycle.RequestCycle;
public abstract class GClientGeocoder extends AjaxEventBehavior
	private static final long serialVersionUID = 1L;
	// the TextField providing the requested address.
	private TextField<?> addressField;
Construct.

Parameters:
event
	public GClientGeocoder(String event, TextField<?> addressFieldString key)
	{
		super(event);
		this. = addressField;
		this..setOutputMarkupId(true);
	}
	public void renderHead(Component c, IHeaderResponse response)
	{
		super.renderHead(cresponse);
		.renderHead(cresponse);
	}
	protected void onEvent(AjaxRequestTarget target)
	{
		Request request = RequestCycle.get().getRequest();
		IRequestParameters parameters = request.getRequestParameters();
		onGeoCode(targetparameters.getParameterValue("status").toInt(),
			parameters.getParameterValue("address").toString(),
			GLatLng.parse(parameters.getParameterValue("point").toString()));
	}
	public abstract void onGeoCode(AjaxRequestTarget targetint statusString address,
		GLatLng latLng);
	{
		return "Wicket.geocoder.getLatLng('" + getCallbackFunction(CallbackParameter.explicit("status"), CallbackParameter.explicit("address"), CallbackParameter.explicit("point")) + "', '" +
			.getMarkupId() + "');" + "return false;";
	}
New to GrepCode? Check out our FAQ X