0 Replies Latest reply on Feb 29, 2012 11:57 PM by vascopiff

    Problem sorting list with virtual layout = false (and also with true)

    vascopiff

      Hi,

       

      I've a problem sorting a list... or better... I've a problem showing the sorted list ;-)

       

      I've a list of xml item. The list is shown with an item renderer.

       

      my needs: a button to refresh data and a button to sort data.

       

      useVirtualLayout = false

      -> refresh works correctly, sort does not affect the view (even if the list is sorted correctly when printed with trace)

       

      useVirtualLayout = true

      -> sort works correctly, refresh reverse the list each time I press it (even if the list remain the same when printed with trace)

       

       

      does any one have an idea?

      thank you!!

       

      -----

      MXML

      <s:List dataProvider="{xmlListCollection}" width="100%" itemRenderer="myRenderer" minHeight="0" id="test" useVirtualLayout="false" >

      <s:layout>

        <s:VerticalLayout clipAndEnableScrolling="true"/>

      </s:layout>

      </s:List>

       

      XML example

      <unit sortField1="First Floor" sortField2="7">

        <employee>

          <id>3040684</id>

          <name>PIFFARETTI Vasco</name>

          <birthdate>20.05.1983</birthdate>

          <beginDate>2012-02-25 08:55:00</beginDate>

          <endDate>9999-12-31 00:00:00</endDate>

          <annotation/>

       

        </employee>

      </unit>