Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
limitedwave777 #1
Paging an image repeater?
Hello! I have this code which pumps some data into an array from a loop in the
function. I cannot figure out what I need to do to hook this up to my repeater.
Code:
I've been using the {acSlides} as my dataprovider on my repeater, inside a
tiler. I see this paging system uses an Array Collection first, then pulls
pages from it. I'm just wondering what path I should be on. Should I be
figuring out how to use paging from my existing ArrayCollection, or should I
make a new one? This is really confusing! All the samples I see say "I did it
for an xxx but you can do it on a xxx or xxx or anything" but being new to
Flex, I'm not sure how the principles apply maybe? Help!
[Bindable] private var acSlides:ArrayCollection;
private function resultHandler(event:ResultEvent) :void
{
acSlides = event.result.response.data.row;
initApp();
}
//************************************************** *************************
************
[Bindable]private var orgData:ArrayCollection = new ArrayCollection();
[Bindable]private var nav:ArrayCollection = new ArrayCollection();
[Bindable]private var currentPage:Number = 0;
[Bindable]private var pageSize:uint = 10;
[Bindable]private var navPage:uint = 1;
[Bindable]private var navSize:uint = 10;
private function InitApp():void{
for( var x:uint = 1; x <= 500; x++ ){
var obj:Object = new Object();
obj.Id = x.toString();
obj.Name = "Column " + x.toString();
obj.Street = "5555 Street";
obj.Title = "CEO";
obj.City = "El Paso";
orgData.addItem(obj);
}
}
limitedwave777 Guest
-
Use component within the repeater
Dear All, i am now facing a problem with repeater . I have writing a component completely by actionscript . As i want to generate that component... -
Repeater Control
I am a novice programmer. I want to use a repeater to display a button for every item in the cache. Each button should have the key of the cache... -
Repeater paging problem
Hi, I'm trying to do the following but I can't understand what's wrong. Could you help me here! I do paging with a Repeater like this: ... -
How to embed image control in a repeater?
Hi, I have a repeater in my vb.net page which needs to render an image control (it's a mappoint linedrive map image). The repeater itself is... -
Repeater
Why is the repeater displaying only the first 14 items, when my table has 27 items. <%@ Page language="c#" AutoEventWireup="true" %> <%@... -
limitedwave777 #2
Re: Paging an image repeater?
The rest of the code:
<utils:FXCPager id="fxcPager" pageIndex="{currentPage}" pageSize="{pageSize}"
dataProvider="{orgData}" />
<mx:VBox verticalGap="0">
<mx:DataGrid id="fxc_dg" dataProvider="{fxcPager.pageData}" width="600"/>
<mx:VBox horizontalAlign="center" width="{fxc_dg.width}" >
<controls:FXCPagerBar
id="fxc_pageNav2"
pager="{fxcPager}"
totalPages="{Math.ceil(orgData.length/pageSize)}"
maxVisiblePages="{navSize}"
buttonWidth="40"
buttonMode="true"/>
<mx:NumericStepper value="{this.pageSize}" change="this.pageSize =
event.target.value" maximum="500"/>
</mx:VBox>
</mx:VBox>
limitedwave777 Guest
-
ntsiii #3
Re: Paging an image repeater?
I do not understand your question. I do not see any reapeater anywhere in the
code you post.
what do you mean by "...hook this up to my repeater..."?
To page a repeater, you set its startingIndex and count properties.
Tracy
ntsiii Guest
-
limitedwave777 #4
Re: Paging an image repeater?
Fixed...I set the dataProvider for the fxcPager to be my ArrayCollection, that worked. fxPager component s great.
limitedwave777 Guest



Reply With Quote

