I have modified the dataprovider to that of an Object. I have coldfusion returning a struct:
<cfset responses[#variables.loopIndex#] = StructNew()> <cfset responses[#variables.loopIndex#].question = #qry_questions.QuestionText#> <cfset responses[#variables.loopIndex#].answers = StructNew()> I am still having problems extracting the data from the Object using a repeater. The following is only supposed to display the questions, but doesn't. What is my problem? <mx:Repeater id="rp_question" dataProvider="{obj_responses}" > <mx:VBox width="100%"> <mx:Text id="qtext" width="100%" fontWeight="bold"> <mx:text>{rp_question.currentIndex + 1}.) {rp_question.currentItem.QUESTION.toString()}</mx:text> </mx:Text> </mx:VBox> </mx:Repeater> --- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote: > > The data for each item in the nested repeater must be nested in the > dataProvider for the main repeater. You pass the appropriate part of > the main dataProvider to the nested repeater using currentItem. > > > > Of course, you will need to use an AsyncToken when you call the answer > RO, so that in its resultHandler you can associate the correct data with > the correct item at the main repeater level. I'd use XML for this. > > > > Also, it would be better to build this data on the server, and pass the > whole datqaProovider at once. If that is an option. > > > > Tracy > > > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of bulldog65mustang > Sent: Friday, January 26, 2007 1:20 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Nested Repeater problem > > > > I have a situation where I need to call a RemoteObject that returns a > set of questions. I set the dataProvider of my Repeater to this > ArrayCollection. The Result Handler of this RO loops through the > ArrayCollection and calls another RO to retreive the answers( may have > multiple answers per question). the problem I have is that each > answer for the questions retreived are the answer of only the last > question. I know why this is occuring, I have the same dataProvider > being used for the inner Repeater. > > My question is how can I fix this. I have tried to insert the answer > results from each question into an Array, but I cannot get the > Repeater to work when I try this. >