List Receiver in RequestFactory

17 views
Skip to first unread message

camper2020

unread,
Jul 13, 2011, 7:43:02 AM7/13/11
to Google Web Toolkit
Hi there,

Trying to make my way around GWT and request factory, I'm currently
trying to receive a list of EntityProxies from the server, I am using
locators and as such I might be making a mistake there somewhere.

I am able to receive a single EntityProxy but when I pull through a
List<EntityProxy>, a list of the correct size is pulled through, but
each item is the exact same object (well copies of), namely the first
item repeated.

Here is my Receiver code:

Receiver<List<EmptyObjectProxy>> emptyObjectReceiver = new
Receiver<List<EmptyObjectProxy>>() {
@Override
public void onSuccess(List<EmptyObjectProxy> response) {
Window.alert(response.size() + "");
emptyObjectViewTable.setRowData(0, response);
emptyObjectViewTable.setRowCount(response.size(), true);
}
};
context.getAll().fire(emptyObjectReceiver);

Any help would be greatly appreciated.

Regards.

Thomas Broyer

unread,
Jul 13, 2011, 9:12:55 AM7/13/11
to google-we...@googlegroups.com
First, check that they all have a different ID and that they don't compare equals() to each others.

camper2020

unread,
Jul 13, 2011, 9:26:04 AM7/13/11
to Google Web Toolkit
Hi Thomas,

Thanks for the reply, it was the IDs, was thinking that the getId()
and getVersion() needed to be implemented by the actual modifying was
done automatically by the RequestFactory not that it needed to be done
manually.

Thanks for the help!

Regards.
Reply all
Reply to author
Forward
0 new messages