Repeater is not executing error is showing when i change the dataprovider of the repeater

78 views
Skip to first unread message

Firoz

unread,
Mar 27, 2009, 1:15:56 AM3/27/09
to Flex India Community
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

Vinod M Jacob

unread,
Mar 27, 2009, 1:43:53 AM3/27/09
to Flex India Community
Can you please elaborate you problem a little more ?

pankaj munjal

unread,
Mar 29, 2009, 11:21:03 AM3/29/09
to flex_...@googlegroups.com
use repeterItem Propery instead of repeterIndex property,it creates pb when we chagne dataprovider

Firoz

unread,
Mar 30, 2009, 1:16:53 AM3/30/09
to Flex India Community
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 <mailtopankajmun...@gmail.com>
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 <flex4...@gmail.com> wrote:
>
>
>
>
>
> > Can you please elaborate you problem a little more ?
>
> > On Mar 27, 10:15 am, Firoz <firoz...@gmail.com> 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 -

shaik firoz

unread,
Mar 30, 2009, 1:18:27 AM3/30/09
to flex_...@googlegroups.com
--
sk.firoz
          <mca>

Nicholas

unread,
Mar 30, 2009, 11:08:17 AM3/30/09
to Flex India Community
make the property _webPageEvents bindable
[Bindable]
var _webPageEvents:ArrayCollection ......
Reply all
Reply to author
Forward
0 new messages