- Send a simple test String object back first (instead of db search results) to confirm that your remoting setup is working correctly (use the Flex Builder debugger to see what's coming back in the ResultEvent!)
- Confirm that you're actually getting something from your Hibernate query to send back to Flex, this simple check escapes my "Hibernate guy's" attention all the time. If this is a Hibernate/query issue, you're probably asking in the wrong place.
- If you're sure that the Flex-Java connection is functioning and Hibernate is returning results, what type of object are you returning from Java? This will determine the type of object you're getting in the Flex client. A HashMap is an Object to Flex - it appears that you're trying to access the data as if it was a Java HashMap (likely a single result, then), but it's probably an ArrayList of results. (yes?) If it is, e.result will be an ArrayCollection (use a debugger breakpoint to verify). So:
- (If you're sending an ArrayList) var list:ArrayCollection = e.result as ArrayCollection; (access each object in list as needed)
Also (not that this matters for certain), are you using BlazeDS or Granite Data Services (Seam makes me think Granite since they integrate w/Seam and Hibernate specifically)?
I am using FlamingoDS I am getting the result which include direct values
and reference to the master table of calling table I want to access the
I tried to show wht that reference is printing with alert.It shows nothing
in the alert
I am getting the direct values without any problem but i don't know how to
get the values by using the master reference
I'm having trouble understanding the problem. To "get the values by using the master reference" if I understand correctly, e.result is correct.
The easiest way to figure out what's going on is to just set a breakpoint in that code, and use the debugger. If you're just having trouble accessing the data in the result you can see via the debugger what type of object(s) are coming across and what the properties for those values are.
e.result is giving the values it's fine
but out of these values 2 are the references to it's master table
I am calling like this
e.result.masterreference.membervariable but it's not giving the member variable of master
The detail table has a String field
I am calling like this
e.result.stringfield it's giving the value as I expected from the database
but I am not getting the values of master table by using the reference available in detail table
If possible send me an example which is related to master/detail relation
please help.............. me