Saturday, April 27, 2013

Re: Entity not persisted, using JDO,RequestFactory.

On Friday, April 26, 2013 6:05:42 AM UTC+2, Aman Sharma wrote:
I am still not able to persist poll entity using Requestfactory in GWT. Please point out if there's anything wrong with following code.

PollRequest pr = requestFactory.pollRequest();
UserRequest ur = requestFactory.userRequest();
final UserProxy[] oldUser=new UserProxy[1];
ur.findUser(Cookies.getCookie("user")).fire(new Receiver<UserProxy>(){
public void onSuccess(UserProxy user){

UserProxy editUser=ur.edit(oldUser[0]);

At that point, oldUser[0] still is 'null' (hint: requests are asynchronous)
PollProxy createdPoll = ur.create(PollProxy.class);
ur.persist().using(editUser).fire(new Receiver<Void>(){
public void onSuccess(Void arg0){
view.setMsg("POll Created");

'pr' is never used; error in your code above?

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment