|
RE: DWR returning complex data types?: msg#00147java.dwr.user
How does your dwr mapping look like? First thing is to make sure you have convert entries for all 3 objects: <convert converter="bean" match="mystuff.Campaign"> <param name="include" value="promotions, pages, ...." /> </convert> <convert converter="bean" match="mystuff.Promotion"> <param name="include" value="name, ...." /> </convert> <convert converter="bean" match="mystuff.Page"> <param name="include" value="...." /> </convert> This is just an example. You might be using a different converter type. Then you should be able to access the properties you defined for each if the exposed function returns a campaign: "campaign.promotions[0].name" or something similar Hope that helps. -----Original Message----- From: oblongman [mailto:matthew.hersee-8bQN/kh5CuY@xxxxxxxxxxxxxxxx] Sent: Friday, February 16, 2007 17:04 To: users-EyPigyGktj4FDOXUYO6UHQ@xxxxxxxxxxxxxxxx Subject: [dwr-user] DWR returning complex data types? Hi, I love this DWR stuff, so easy to get going, until now. Anyway I am fairly new to DWR so this question should be an easy one to answer i hope. I have the following object model Campaign(){ List<Promotion> promotions; List<Page> pages; } --The problem When i run something like addPageToCampaign() i want the whole of the Campaign object to be returned and available in JavaScript. I.e. it is simple to get DWR to return a list of Promotion objects and then run data[0]['param1'] How do i get DWR to deal with the whole of the Campaign object, i.e. containing 2 lists of different objects. I have tried all kinds of Javascript notation but cant get it working. Any help greatly appreciated. Matt -- View this message in context: http://www.nabble.com/DWR-returning-complex-data-types--tf3239902.html#a9005 885 Sent from the DWR - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe-EyPigyGktj4FDOXUYO6UHQ@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help-EyPigyGktj4FDOXUYO6UHQ@xxxxxxxxxxxxxxxx
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | DWR returning complex data types?, oblongman |
|---|---|
| Next by Date: | RE: DWR returning complex data types?, oblongman |
| Previous by Thread: | DWR returning complex data types?, oblongman |
| Next by Thread: | RE: DWR returning complex data types?, oblongman |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |