mxml代码:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx"
               minWidth="955" minHeight="600">
    <fx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;
            import mx.controls.Alert;
            public var arr:ArrayCollection = new ArrayCollection([
                {label:"Dan Orlando"},
                {label:"Tarip Ahmeh"},
                {label:"John C Bland IT"}
            ]);
            
        ]]>
    </fx:Script>
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <mx:List id="myFriends" dataProvider="{arr}"/>
</s:Application>

User类:
package com.xyw.model
{
    public class User
    {
        public var id:Number;
        public var username:String;
        public var birthday:Date;
        public function User()
        {
        }
    }
}

 

相关文章:

  • 2021-09-02
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
  • 2021-07-26
  • 2021-08-16
  • 2022-01-04
猜你喜欢
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-02
  • 2021-10-18
  • 2021-12-11
相关资源
相似解决方案