On Thu, Jun 30, 2011 at 9:32 PM, David Chandler <drfibonacci@google.com> wrote:
Magno is correct. You can create multiple proxy representations of an entity, so could have ClientProxy with accessor methods for all properties and LightweightClientProxy with only getId() and getStringRepresentation()./dmc--On Thu, Jun 30, 2011 at 8:10 PM, Magno Machado <magnomp@gmail.com> wrote:
i think you could create another proxy for Client which is just id and name
But I had a similar need some time ago and I found it better to use gwt-rpc for that specific case, although the app uses mainly requestfactory--
On Thu, Jun 30, 2011 at 8:38 PM, Gal Dolber <gal.dolber@gmail.com> wrote:--Imagine an example:let say I want to show in the client the following table of Sales:Id | Client | Product | Number-------------------------------------------------------------------------1 | John Doe(2) | iMac 27'(23) | 12 | Chris More(3) | Mac book'(4) | 2With Sale being:class Sale {private long id;private Client client;private Product product;private Integer number;.....}John Doe(2) is the name of the client and 2 is the id. Same thing for Product.The problem is that to find out the Client's name I need to send it to the client (in the case of RequestFactory as a ClientProxy).I don't want to send the whole Client throw the wire when I only need the id and a "string representation". Plus, the example being a table, it may be listing 30+ Sales, and include the relationship makes it really heavy to load.The question is how can I do with RF to get a "string representation" and the id of a Proxy without loading it all?Before using RF I used two object i.e: Sale and SaleDto, and I made the conversion myself on the server.Thanks in advance!
--
Guit: Elegant, beautiful, modular and *production ready* gwt applications.
http://code.google.com/p/guit/
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.
Magno Machado Paulo
http://blog.magnomachado.com.br
http://code.google.com/p/emballo/
--
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.
David Chandler
Developer Programs Engineer, GWT+GAE
w: http://code.google.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools
--
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.
--
Guit: Elegant, beautiful, modular and *production ready* gwt applications.
http://code.google.com/p/guit/
--
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