|
RE: DWR returning complex data types?: msg#00148java.dwr.user
hi, that was exactly what i needed, i forgot that the other beans needed to be registered in dwr.xml. i guess all the other examples i'd seen had just returned simpler structures so i thought i missing something more. this DWR stuff is so cool! Thanks for your help Matt matan wrote: > > 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 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > users-unsubscribe-EyPigyGktj4FDOXUYO6UHQ@xxxxxxxxxxxxxxxx > For additional commands, e-mail: > users-help-EyPigyGktj4FDOXUYO6UHQ@xxxxxxxxxxxxxxxx > > > -- View this message in context: http://www.nabble.com/DWR-returning-complex-data-types--tf3239902.html#a9006718 Sent from the DWR - Users mailing list archive at Nabble.com.
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: DWR returning complex data types?, matan-FP6co0geiwbQT0dZR+AlfA |
|---|---|
| Next by Date: | postHook behavior change in 2.0 RC2?, Vinay A. Jain |
| Previous by Thread: | RE: DWR returning complex data types?, matan-FP6co0geiwbQT0dZR+AlfA |
| Next by Thread: | postHook behavior change in 2.0 RC2?, Vinay A. Jain |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |