3 Replies Latest reply on Jan 9, 2008 4:02 PM by Tikis_Mikis

    List component missing some rows

    Tikis_Mikis Level 1
      This is a strange bug I'm finding. I have a list component that is dynamically populated. However some rows seem to be displayed while others are not. If I refresh the page some one row will appear. If I click refresh again that row might not appear anymore. Has anyone seen this before????
        • 1. Re: List component missing some rows
          atta707 Level 2
          Are you using a custom item renderer for this list? If so, could you show some code on how are you using it?

          ATTA
          • 2. Re: List component missing some rows
            Tikis_Mikis Level 1
            Hm...custom item renderer? Here is my panel with the list component:

            <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" creationComplete="initApplication()"
            layout="absolute"
            width="1180"
            height="496">

            <mx:Panel x="10" y="10" width="228" height="232" layout="absolute" title="Filters" fontSize="11">
            <mx:List x="0" y="0" width="100%" height="100%"
            id="avalFilters" dragEnabled="true" dragMoveEnabled="true">
            </mx:List>
            </mx:Panel>

            </mx:Application>


            from my initApplication function I make a server call (PHP) -> (the "4" is the ID of they records to return - they are associated by that ID.

            gateway.call("SErvice.getRecords", new Responder(onRecordsResult, onFault), 4);

            Finally here is my function where I assign the data provider:

            public function onFiltersTiersResult(result:Array):void
            {
            phpData = new ArrayCollection(result);

            // set the data for the filters and tiers list user can choose from
            avalFilters.dataProvider = phpData[0]['set1'];
            avalTiers.dataProvider = phpData[0]['set2'];
            }

            where the index 'set1' and 'set2' both are indexed arrays (0 - num of records-1) and each index points to an array that has a 'data' (the record ID) and 'label' (the record name)

            I formatted my array like that because I was sending back a bunch of data and it seems for the AMFPHP interface to work the array returned by PHP must be at the very top level an indexed array (as in phpData[0] above)

            All my data appears and is in the arrays...I tried using te Alert.show() to ensure that all rows are found and they are its just that when they appear in the List componenet some rows disappear...not sure why!
            • 3. Re: List component missing some rows
              Tikis_Mikis Level 1
              Ok i tested it out the problem is NOT that the whole list is not populate but rather that lets say i scroll down in the list then scroll back up it fails to rerender the ites in the list. They appear again if i scroll down and up again but others are appear and disappear as well! Help!