Paging an image repeater?

Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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: ...
    4. 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...
    5. Repeater
      Why is the repeater displaying only the first 14 items, when my table has 27 items. <%@ Page language="c#" AutoEventWireup="true" %> <%@...
  3. #2

    Default 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

  4. #3

    Default 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

  5. #4

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139