Hi,

I have a case where I have an object

   class ObjectFoo {
         private ObjectFoo next;
         private ObjectFoo previous;
   }

These Objects get stored in a parent object as a set

   class Parent {

      private Set<ObjectFoo> foos;

   }

when I work with a particular object I am having difficulty "updating
the tree", and just wanting to know How I can properly populate an
ObejctFoo with other previously persisted ObjectFoo's ?


Attempt A.  - Set the next and previous on all objects and store.
problem: it recurses the object graph going between one and two and
then stack overflows (on the server).


        ParentRequest req= getRequestFactory().parentRequest();
        ObjectFooProxy one = req.create(ObjectFooProxy .class);
        ParentProxy editableParent = req.edit(parent);
        ObjectFooProxy editabletwo = req.edit(two);

       one.setNext(editabletwo );
       editabletwo.setPrevious(one);  // previously created

        editableParent.getFoos().add(one);
        req.persist().using(editableParent).fire();

Will try (somehow) .. :
     create and store (one).
     on success of entityproxyChange event, ** edit two and set the
reference to one.

BUT.. how do I, after persisting One, retrieve the new copy of it ?
   a. can I get it out of the RequestFactory, or do I have to query it
up ?
   b. can I use the EntityProxyChange event ? if so, How will I
recognise it is "my" ObjectFoo{one} that comes back ?


 any ideas ? (do I need to clarify the problem ? )

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

Reply via email to