You will have to go through a Proxy[1] to hand that over to the client. [1] http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html#proxies
On Wed, Aug 10, 2011 at 6:19 PM, Micah Caldwell <[email protected]> wrote: > The RequestFactory code I have is all working great. I am able to transfer > objects back and forth between the server and the client without trouble. > It's only when I try to return the results of a JDO query that I run into > trouble. > > The JDO side of things is working great. I can query the datastore from > the server with JDO and "do stuff" with those results on the server, except > sending those results to the client. > > The RequestFactory + JDO interaction is working great with the exception of > query results. I can successfully save JDO objects created on both the > server and the client (via RequestFactory). I can also successfully return > aggregate JDO query results to the client (such as count). > > Again, my only problem lies with sending entity query results to the > client. Everything else done with RequestFactory and JDO works great. > > In case anyone wants to see my test app (Eclipse project): > > https://docs.google.com/leaf?id=0B-VN2UqJX3l4YTViN2E2OTItNTBkZS00NzQ4LThlNmUtNzYyZDhmZWM0YTNj&sort=name&layout=list&num=50 > > Do you send JDO query results (javax.jdo.Query) to the client in your > application where the query returns a JDO & RequestFactory enabled object? > > This is how I am executing the query. This is in a RequestFactory method > called by the client through a RequestContext meaning that the list returned > by this method will be packed up by the RequestFactory and shipped off to > the client for unpacking (it's the packing step that throws the exception). > > Query lQuery = MyPersistenceManagerFactory.fGet().newQuery(MyEntity.class); > try > { > List<MyEntity> lMyEntities = (List<MyEntity>) lQuery.execute(); > return lMyEntities; > } > finally > { > lQuery.closeAll(); > } > > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-web-toolkit/-/tj0KOVUyz4EJ. > > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > -- Odeyemi 'Kayode O. http://www.sinati.com. t: @charyorde -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
