-
1. Re: Seam Remoting not returning deep object tree
shane.bryzak May 26, 2008 5:12 PM (in response to rituraj_tiwari)It should definitely support this - could you please raise this as an issue in JIRA with a reproducible test case?
-
2. Re: Seam Remoting not returning deep object tree
rituraj_tiwari May 26, 2008 8:59 PM (in response to rituraj_tiwari)Shane,
Thanks for your response. A simple test case I wrote works. Right now I am looking to see why my actual code fails.-Raj
-
3. Re: Seam Remoting not returning deep object tree
rituraj_tiwari May 26, 2008 9:33 PM (in response to rituraj_tiwari)Shane,
This is looking like a concurrency issue. My actual code makes several remoting calls in quick succession. I set breakpoints in MarshalUtils to see what was coming back from remoting calls. The result value returned by call.getResult() looks different depending on the timing of my pause and resume of the threads.Let me know if this info is sufficient for a JIRA bug report.
-Raj
-
4. Re: Seam Remoting not returning deep object tree
rituraj_tiwari May 26, 2008 11:03 PM (in response to rituraj_tiwari)Shane,
Looks like this was an issue with loading my entities. Seam remoting is working fine.Thanks for your time.
-Raj
-
5. Re: Seam Remoting not returning deep object tree
serkan.s.eskici.online.nl Jun 3, 2010 8:52 AM (in response to rituraj_tiwari)Can you pls provide some feedback on how you've solved this problem ?
Because I'm having the same problem now.
I have this code:
@Entity public class Customer { //some primitive attributes ... @Embedded @NotNull private Address address = new Address(); }
@Name("myRemoteBean") public class RemoteBean { @In EntityManager em; @WebRemote public List<Customer> getCustomers() { return this.em.createQuery("from Customer").getResultList(); } }
<ui:define name="body"> <s:remote include="gmapViewer"/> <div id="map" style="width: 450px; height: 450px;"></div> <button id="contactsBtn">Show customers</button> </ui:define>
/** * Seam Remote call. * * @return a list of customer addresses. */ function getContacts() { Seam.Remoting.setDebug(false); Seam.Component.getInstance("myRemoteBean").getCustomers(callback); } /** * Seam Remote call result. * * @param result the result of the call */ function callback(result) { for(var i=0; i<result.length; i++) { var customer = result[i]; alert("firstname: " + customer.getFirstname()); <------------------- this works fine ! alert("street: " + customer.getAddress().getStreet()); <-------------- this is not working ! } }
And when I change my code to this:
@WebRemote public List<Address> getCustomers() { return this.em.createQuery("select c.address from Customer c").getResultList(); }
Then it works !!
It seems that I can't iterate deep through the object graph.