2 Replies Latest reply on Jul 9, 2009 9:15 PM by Benoitcn

    Java data send to flex issue

    Benoitcn Level 1

      This is my data structure at back-end using java,

       

      ArrayList

                HashTable(keys, values);

                HashTable(keys, values);

                ...

                ...

       

      but the problem is when push the data to flex this data structure will be coverd to a instance of ArrayCollection and the HashTable covered to a Object.

      HashTable is out-of-order so the order of my data in flex is different every time . I use the ArrayCollection bind to the DataList component directly, and I don't want to indicate the order of each columns of  each DataList Component.How can I fix this ?

       

       

      var dataSource:ArrayCollection = from Java back-end;

       

      <mx:DataList dataProvider="{dataSource}" />

       

      I don't want to indicate each columns like this, because I have a lot of different structure tables in SQL.

       

      <mx:DataList dataProvider="{dataSource}" >

          <mx:DataListColumns dataField="ID" />

          <mx:DataListColumns dataField="Name" />

          <mx:DataListColumns dataField="Age" />

          <mx:DataListColumns dataField="Address" />

      </mx:DataList>