It did not solve my problem

I have written the code like this.


var _webPageEvents: ArrayCollection = new ArrayCollection
( [ {eventname:"Optout", eventtype:"S",
targetoption:"S",targeturl:null},
 
{eventname:"Donotoptout", eventtype:"C", targetoption:"C"
targeturl:null}
                                       ] );
var _radioBtns: ArrayCollection = new ArrayCollection
( "Optout","Donotoptout" );

var _isMultipleEvent : Boolean = true;

<mx:Repeater id="rp" automationName="rp"
dataProvider="{_webPageEvents}" count="{_webPageEvents.length-1}" >
                <mx:Canvas width="100%" backgroundColor="#E9E9E9" 
cornerRadius="6"
borderThickness="0" borderStyle="solid" height="105">
                        <mx:Label x="60" y="10" text="{(_isMultipleEvent == 
'Y') ? 'Option'+
(rp.currentIndex+1) : _submitBtnsList.getItemAt
(rp.currentIndex).toString()}" id="lblOption1" textAlign="right" />
                        <mx:ComboBox styleName="comboBoxForm" x="120" y="9" 
id="cbOption1"
name="cbOption1" height="18" width="200"
                                dataProvider="{(_isMultipleEvent == 'Y') ? 
_radioBtnsList : []}"
                                                
selectedIndex="{(_isMultipleEvent == 'Y') ?
_radioBtnsList.getItemIndex(rp.currentItem.eventname) : -1}"
                                visible="{(_isMultipleEvent == 'Y') ? true : 
false}"/>
                        <mx:RadioButton x="120" y="33" name="rbOption1Optout"
label="Optout" id="rbOption1Optout"
                                value="S" groupName="{'rb'+(rp.currentIndex+1)}"
selected="{rp.currentItem.eventtype == 'S' ? true : false}" />
                        <mx:RadioButton x="205" y="33" name="rbOption1Continue"
label="Continue" id="rbOption1Continue"
                                value="C" groupName="{'rb'+(rp.currentIndex+1)}"
selected="{rp.currentItem.eventtype == 'C' ? true : false}" />
                        <mx:Label x="120" y="58" 
text="{resourceManager.getString('locale',
'webPageManager.Optout.ForwardTo')}" id="lbForwardTo1"/>
                        <mx:ComboBox styleName="comboBoxForm" 
name="cbOption1ForwardTo"
x="198" y="58" id="cbOption1ForwardTo" height="18" width="122"
                                
dataProvider="{resourceManager.getStringArray('locale',
'webPageManager.Optout.SuccessCancelOthers')}"
                                selectedIndex="{(rp.currentItem.targetoption == 
'S' ? 0 :
(rp.currentItem.targetoption == 'C' ? 1 : 2))}"
                                change="setControlVisible(event)" />
                        <mx:TextInput x="326" y="58" height="18" 
id="txtForwardTo1"
name="txtForwardTo1" width="250"
visible="{(rp.currentItem.targetoption == 'O') ? true : false}"
                                text="{rp.currentItem.targeturl}"/>
                        <mx:Label x="324" y="77" 
text="{resourceManager.getString('locale',
'webPageManager.Optout.urlExample')}" color="#5C5C5C" id="lblUrl1"
                                visible="{(rp.currentItem.targetoption == 'O') 
? true : false}"/>
                </mx:Canvas>
        </mx:Repeater>

The above code works fine but when the changes made to the
dataproviders like this:


var _webPageEvents: ArrayCollection = new ArrayCollection
( [ {eventname:"", eventtype:"S", targetoption:"S",targeturl:null},
 
{eventname:"", eventtype:"S", targetoption:"S" targeturl:null},
{eventname:"", eventtype:"S", targetoption:"S" targeturl:""}

                                       ] );
var _submitBtns: ArrayCollection = new ArrayCollection
( "submitbtn","cancelbtn","closebtn" );

var _isMultipleEvent : Boolean = false;


so any other idea why i am getting the error as "Repeater is not
executing" with the above code will be greatly helpful to me.

Thanks in advance.




On Mar 29, 8:21 pm, pankaj munjal <[email protected]>
wrote:
> use repeterItem Propery instead of repeterIndex property,it creates pb when
> we chagne dataprovider
>
> On Fri, Mar 27, 2009 at 1:43 AM, Vinod M Jacob <[email protected]> wrote:
>
>
>
>
>
> > Can you please elaborate you problem a little more ?
>
> > On Mar 27, 10:15 am, Firoz <[email protected]> wrote:
> > > Hi,
>
> > >         when i change the dataprovider to a repeater component, it is
> > > showing the following error.
>
> > > Error: Repeater is not executing
> > > at mx.core::Repeater/get
> > > currentIndex()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx
> > > \core­\Repeater.as:283]
>
> > > Plz help me.
>
> > > Thank you,
> > > Firoz- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to