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

Flex Tree×é¼þDemo

Õâ¸öDEMO¿ÉÒÔ´´½¨Ò»¸öȫеÄÊ÷Ðͽṹ£¬ÈÃÎҸе½Ææ¹ÖµÄÊÇ£¬ËäÈ»ÎÒÓÃXML¶ø²»ÊÇXMLListCollection/ArrayCollection×÷ΪTreeµÄÊý¾ÝÔ´£¬µ«¶ÔXMLµÄ¸üÐÂÒÀÈ»»áÔÚTreeÖз´Ó³³öÀ´——ÕâËƺõºÍFlexµÄÎĵµÓгåÍ»£¬ÏÂÃæÊÇÒýÓÃFlexÎĵµµÄÒ»¶ÎÄÚÈÝ£º
Raw objects are often not sufficient if you have data that changes, because the data provider component does not receive a notification of any changes to the base object. The component therefore does not get updated until it must be redrawn due to other changes in the application, or if the data provider is reassigned. At that time, it gets the data again from the updated raw object.
Here is the demo(Ôõô²åÈëswfÎļþ£¿ÓÃembed±êÇ©£¿)
Source code here:
<?xml version="1.0"?>
<!-- dpcontrols/TreeSimple.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" fontSize="12">
<mx:Script>
<!--[CDATA[
import mx.collections.ArrayCollection;
import mx.collections.XMLListCollection;

[Bindable]
private var list:XML = <list/>;

public function onBtnAddNodeClick(e:Event):void
{
var newNodeName:String = nodeName.text;
if(newNodeName.length == 0)
return;

var currentNode:XML = XML(tree.selectedItem);
if(currentNode == null || currentNode.@type!=1)
return;

var newNode:XML = <node/>;
newNode.@label = newNodeName;
newNode.@type= 1;
newNode.@isBranch = true;

currentNode.appendChild(newNode);
}

public function onBtnAddTopNodeClick(e:Event):void
{
var newNodeName:String = nodeName.text;
if(newNodeName.length == 0)
return;

var newNode:XML = <node/>;
newNode.@label = newNodeName;
newNode.@type= 1;
newNode.@isBranch = true;
list.appendChild(newNode);
}

public function onBtnDelNodeClick(e:Event):void
{
var currentNode:XML = XML(tree.selectedItem);
if(currentNode == null)
return;
var sibling:X


Ïà¹ØÎĵµ£º

³£ÓõÄFlex´úÂë×ܽá

³£ÓõÄFlex´úÂë×ܽá
1.Ë¢ÐÂä¯ÀÀÆ÷

¡¡¡¡navigateToURL(new URLRequest("javascript:location.reload();"),"_self")

¡¡¡¡2.¹Ø±Õä¯ÀÀÆ÷

¡¡¡¡navigateToURL(new URLRequest("javascript:window.close()"),"_self");

¡¡¡¡3.´ò¿ªÒ»¸öÐÂä¯ÀÀÆ÷´°¿Ú

¡¡¡¡navigateToURL(new URLRequest('ht ......

flex ÓÒ¼ü²Ëµ¥¹ÜÀí¹¤¾ßÀà

/*============ʹÓÃ==========*/
var contextmenu:ContextMenuManager=new ContextMenuManager();
contextmenu.add("×î´ó»¯",menuHandle);//menuHandle´¦Àíº¯Êý
/**==================ContextMenuManager.as==========================*/
package file
{
    import flash.display.Interact ......

FLEX no.4

-----------------ex4_01_solution------------------Creating an event and dispatching the event object
<s:Application ...
creationComplete="employeeService.send()">
»á´¥·¢£º
    <!-- Declarations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   
& ......

È¥µôFlexÀ¶É«Ñ¡ÖÐ״̬

 Æäʵһ°ãµÄÇé¿öÏÂÊDz»»áÓõ½ÕâÖÖÇé¿öµÄ£¬Ò»°ãÔÚ³ÌÐòÀ±ÈÈçÑ¡ÖÐÒªÌîдµÄÏîÄ¿£¬¶¼Ï²»¶ÓÐÒ»¸öÑ¡ÖеÄ״̬£¬µ«ÊÇÏÖÔÚÎÒÃÇÀ´¸ö·´ÆäµÀ¶øÐÐ,Èç¹ûÎÒ²»ÏëÒªÕâ¸ö״̬¸ÃÔõô°ìÄØ?
      ²Î¿¼ÁËЩ×ÊÁÏ,ÆäʵҲ¼òµ¥,Óкü¸ÖÖ·½·¨£¬µ«ÊÇ·¢ÏÖÁËÒ»¸ö×îÓÐÓõķ½·¨,Ê×ÏÈÎÒÃÇÔÚÎę̀ÉÏËæÒâ·Å¼¸¸öTEXTINPUT ......

flex¹ú¼Ê»¯

£¨ÉÏ£©
µ±ÒªÊ¹Óò»Í¬ÓïÑԵİ汾µÄʱºò£¬±ãÐèÒªÁËÓ¦ÓóÌÐòµÄ¹ú¼Ê»¯¡£
¹ú¼Ê»¯²»µ¥Ö¸×Ö·û´®µÄ¹ú¼Ê»¯£¬»¹ÓÐǶÈëʽ×ÊÔ´£¨Í¼Æ¬£©µÄ¹ú¼Ê»¯£¬½Å±¾ÀඨÒåµÄÒýÓá£ÔÚ³ÌÐòµ±ÖÐʹÓùú¼Ê»¯µÄÒªµã°üÀ¨Á˱àд×ÊÔ´Îļþ£¬²ÎÊýµÄÉèÖ㬱¾µØ»¯Ïà¹ØµÄflex¿ò¼ÜÄÚÈÝ¡£
×ÊÔ´ÎļþÊÇÓúó׺ÃûΪ“.properties”½áÊøµÄÎļþ£¬ÒÔÒ»ÖÖ¼üÖµµÄÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ