Are you using GWT-RPC? I'm not sure I understand your problem completely.
So if I have a service like:
public interface MyService extends RemoteService {
public Entity fetchEntity(String id);
}
public interface MyServiceAsync {
void fetchEntity(String id, AsyncCallback<Entity> callback);
}
then, in the GWT code, something triggers the service. Typically it is via a button click or some event. You seem to indicate that you are doing it by passing the id as a URL parameter, like:
You should be able to parse the URL using the Window.Location.getPath() to get the url param with a regex.
Once you have that, you do this:
MyServiceAsync service = GWT.create(MyService.class);
service.fetchEntity(id, new AsyncCallback<Void>() {
onFailure(Throwable t) {
Window.alert("service call failed: "+t.getMessage());
}
onSuccess(Entity e) {
// do something with the entity
}
});
After onSuccess( ) -- you populate the form with whatever.