Sunday, July 31, 2011

How to use RequestFactory: .with(propertyRefs) for composition of objects

Hello, 

I am newbie to GWT and  I need your professional advice.


My question is : 

how to use RequestFactory: .with(propertyRefs) for kind of "tree" structures when 

these propertyRefs itself contains list of items I would like to retrieve.


Some details: 

On the server-side I have hierarchy of four domain objects A,B,C,D:

  • A object contains (or I'd better say keep reference to)  List <B>
  • B contains List <C>
  • C contains List <D>.

All mentioned domain objects have its corresponding proxy interfaces AProxy, BProxy, CProxy, DProxy to use on the client side.


On the client side I would like to get all that hierarchy of objects

by once requesting AProxy object so I would profit from the easiness of data access using "get" methods and wouldn't be obliged to make looping server requests for every sub-object, sub-sub-objects etc.


Due to specification I should use smth. like  .with("property ref") to get one level of hierarchy 

but what about retrieving following levels of compositions (in my case List <C> for every object B and List<D> for every object C).


Thanks in advance.

--
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/-/7uYQX26ntPIJ.
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.

1 comment: