Friday, November 26, 2010

RequestFactory find and remove

Hi @ all,

i've got a little problem using requestfactory.

public void start(AcceptsOneWidget panel, EventBus eventBus) {
...
ObjectRequest request =
((RequestFactory)requestFactory).objectRequest();
Request<ObjectProxy> findRequest =
request.findObject(place.getObjectId());

findRequest.fire...

public void onSuccess(ObjectProxy response) {
currentObject = response;
}

}


public void delete() {

ObjectRequest request =
((RequestFactory)requestFactory).objectRequest();
Request<Void> deleteRequest = request.remove().using(currentObject);

deleteRequest.fire(...

}

I fetch the object in the start method from my activity. When delete
is called and the remove method from the request is fired i get a
JDOObjectNotFoundException because the findObject Method is called on
the server after the remove method! My question is why or what am I
doing wrong?

Thanks for your help
poe

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment