Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

[Flex]xmlÓëFlexͨÐŵÄÑо¿

Ñо¿E4XÓëFlexµÄ¹Øϵ£¬ËùÒÔ´òËã×ܽáһϣ¬ÓÐ˵µÄ²»¶ÔµÄµØ·½£¬»¹Çë´ó¼Ò¶à¶àÔ­Á¡£
Ò»¡¢×î¼òµ¥Ä£Ê½£ºFlexͨ¹ýhttpserviceºÍdataProvider½øÐÐÊý¾Ý´«Êä
Xml¸ñʽÈçÏ£º
<?xml version="1.0" encoding="utf-8" ?>
<Result>
<NodeA>value1</NodeA>
<NodeB>valve2</NodeB>
……………………………………………
……………………………………………
</Result>
 
ÔÚFlexÖÐÓÐÒ»¸öDataGrid£¬ÕâÑù¾Í¿ÉÒÔÓÃhttpserviceÀ´Ê¹DataGrid»ñÈ¡xmlµÄÊý¾ÝÁË¡£
Flex¶ËÈçÏ£º
<?xml version="1.0" encoding="utf-8"?>   
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
    title="Blog Details">
    <mx:HTTPService showBusyCursor="true" url="http://localhost:8080/text.xml"/ id=”xmlRecord”>
<mx:DataGrid width="712" height="338" dataProvider="{xmlRecord.lastResult.Result}">
        <mx:columns>
               <mx:DataGridColumn headerText="SectionA" dataField=" NodeA" width="400" />
               <mx:DataGridColumn headerText="SectionB" dataField=" NodeB" width="30"/>
      ¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£
        </mx:columns>
</mx:DataGrid>
</mx:TitleWindow>
 
¡ù ÆäÖкì×Ö²¿·Ö±ØÐëÒ»Ö£¬ÓÉÓÚÕâ¸ösample±È½Ï¼òµ¥£¬ËùÒÔKenshin¾Í²»ÉîÈëÑо¿ÁË¡£
¡ù À¶×Ö²¿·ÖÒ»¶¨Òª°´ÕÕxmlµÄ½á¹¹Êéд¡£
ÕâÑùÔÚrun Õâ¸öFlexµÄʱºò£¬ÔÚDataGridÖоͻáÏÔʾNodeA£¦NodeBµÄÄÚÈݼ´value1£¦value2
¶þ¡¢ÉÔ΢¸´ÔÓһЩģʽ
 
Xml¶Ë´úÂëÈçÏ£º
<?xml version="1.0" encoding="UTF-8" ?>
<rss v


Ïà¹ØÎĵµ£º

¸ßЧÂʵij¬´ó¹æÄ£Flex¿ª·¢

Adobe Flex¿ª·¢Ó봫ͳµÄWeb¿ª·¢Óкܶ಻֮ͬ´¦¡£ÕýÈ·µÄÀí½âºÍÀûÓÃÕâЩ²»Í¬Ö®´¦£¬¿ÉÒÔ°ïÖúÎÒÃÇ´´½¨¸ü·á¸»µÄÓû§ÌåÑ飬Ҳ¿ÉÒÔ·´¹ýÀ´Ôö¼ÓÍøÕ¾µÄ¿ÉÓÃÐÔÒÔ¼°ä¯ÀÀºÍ¸üÐÂËٶȡ£Flex»¹ÌṩÁË´óÁ¿µÄ×é¼þºÍ¼¼Êõ¿âÀ´ÈÃWeb¿ª·¢¸ü¼ÓÇáËÉ——ËüÌṩµÄÇ¿´ó¹¤¾ßÒªÔ¶Ô¶³¬¹ý´«Í³Web 2.0ÖеÄÒì²½JavaScriptºÍXML£¨Ajax£©Ó¦ÓᣴËÍ⣬ ......

FlexÒ³ÃæÌøת

Æäʵ¶ÔÓÚÕâ¸öÌâÄ¿ÊDz»Ç¡µ±µÄ£¬ÒòΪflexÖÐÊÇûÓÐÒ³ÃæÕâ¸ö¸ÅÄîµÄ£¬Ò³ÃæÔÚflexÀïÃæÆäʵ¾ÍÊÇÒ»¸ö¸öµÄCanvas£¬vbox£¬
hboxµÈµÈÖ®ÀàµÄ¶«Î÷£¬¿´µ½µÄ²»Í¬Ò³ÃæµÄÇл»£¬¾ÍÊÇÕâЩԪËØÒ»²ã²ãµÄ¶Ñ»ý£¬»òÕßÌæ»»£¬µ«ÊÇΪÁ˺ÃÀí½â£¬»¹ÊdzÆ֮Ϊ
"Ò³ÃæÌøת"¡£ÆäʵÎÒÃÇ¿ÉÒԶԱȴ«Í³µÄC/S¿ª·¢Ä£Ê½£¬Ã»Ò³ÃæÌøת£¬Ö»Óд°ÌåºÍÔª¼þµÄÏÔʾºÍÒþ²Ø¡ ......

ÔÚFLEXÖÐʹÓÃÑùʽ·½·¨

Ò»¡¢Ê¹Óñ¾µØÑùʽ¶¨Òå
ʹÓÃ<mx:Style>±êÇ©ÔÚMXMLÎļþÖд´½¨±¾µØµÄÑùʽ¶¨Òå¡£Õâ¸ö±êÇ©°üº¬ÁË·ûºÏCSS2.0Óï·¨µÄÑùʽ±í¶¨
Òå¡£ÕâЩ¶¨Òå»áÓ¦Óõ½µ±Ç°ÎĵµÒÔ¼°µ±Ç°ÎĵµµÄ×ÓÎĵµ¡£
<mx:style>
.solidBorder{//ÀàÑ¡ÔñÑùʽ
border-style:solid;
}
button{//×é¼þ¶¨ÒåÑùʽ
border-style:solid;
}
....
</mx: ......

ÔÚflexÖÐʹÓÃǶÈëhtmlÎļþÒÔ½â¾öÏÔʾhtmlµÄÎÊÌâ

ÏëÔÚflexÖÐÕæʵµÄÏÔʾhtml,µ«ÊÇtexteara,lable,textÖÐÖ»Ö§³Ö²¿·Öhtml±êÇ©
<a>¡¢<b>¡¢<br>¡¢<font>¡¢<img>Èç¹ûÓÃimgÓÖ´æÔÚÏÔʾ×Ô¶¯»»ÐеÄÎÊÌâ¡£Ö»ÓвÉÓÃǶÈëhtmlµÄ·½·¨À´½â¾ö¡£
1.flexdemo1
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe ......

FLEXºÏ²¢Êý×é

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script><!--[CDATA[import mx.collections.ArrayCollection;
public var a1:ArrayCollection = new ArrayCollection ([{ Region:"Region1",Territory:"Territory1",Ter ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ