flex tree Ìí¼ÓÓÒ¼ü²Ëµ¥
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" fontSize="12">
<mx:Script>
<!--[CDATA[
import mx.controls.Alert;
public var newBuildMenuItem:ContextMenuItem;//²Ëµ¥Ïî±äÁ¿
private function init(): void//³õʼ»¯º¯Êý
{
createTreeMenuItem();
tree.contextMenu = getTreeContxtMenu();
}
public function createTreeMenuItem(): void//²Ëµ¥Ïî´´½¨º¯Êý£¬²¢Ìí¼Ó²Ëµ¥¼àÌýÆ÷
{
newBuildMenuItem = new ContextMenuItem("н¨");
newBuildMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, newBuildHandler2);
}
private function getTreeContxtMenu(): ContextMenu//½«²Ëµ¥ÏîÄ¿Ìí¼Óµ½²Ëµ¥ÖÐ
{
var contextMenu: ContextMenu = new ContextMenu();
contextMenu.hideBuiltInItems();
contextMenu.customItems.push(newBuildMenuItem);
return contextMenu;
}
public function newBuildHandler2(event:Event):void//µã»÷²Ëµ¥Ö´Ðк¯Êý
{
Alert.show("ÕâÊÇн¨µÄ²Ëµ¥µã»÷ºóÖ´Ðеĺ¯Êý");
}
]]-->
</mx:Script>
<mx:Tree id="tree" x="31" y="10" creationComplete="init()"></mx:Tree>
</mx:Application>
ΪtreeÌí¼ÓÓÒ¼ü²Ëµ¥£¬Ò²¿ÉΪÆäËûÈκοؼþÌí¼Ó£¬µ«ÔÝʱû·¨È¥³ýÓÒ¼ü×Ô´øµÄ²Ëµ¥ÏËäÈ»ÍøÉÏÓа취ȥµô£¬µ«ÊǸоõÂé·³£¬´ó¼ÒÓֺð취Ìá³öÀ´°¡
Ïà¹ØÎĵµ£º
Summary:
ÔÚDataGridÖÐÏÔʾ²ã¼¶½á¹¹£¬googleÁËһϣ¬ÕÒµ½flexlibÖеÄTreeGrid¡£°ÑÔ´Âë¼ÓÔص½ÏîÄ¿ÖУ¬°´ÕÕÎĵµÈ¥ÊµÏÖÆ书ÄÜ¡£×îºó·¢ÏÖÓкöàbug£¬±ÈÈ綨λ²»×¼£¬ÎÞ·¨Í϶¯µÈÎÊÌ⡣ͨ¹ýÔĶÁºÍÐÞ¸ÄTreeGridÀ࣬ÕâЩbug¶¼½â¾öÁË¡£½Ó×ÅÎÞÒâÖз¢ÏÖ£¬ÅÅÐòÓÐÎÊÌâ¡£µã»÷ÁÐÍ·ÅÅÐò£¬·¢Ïֲ㼶½á¹¹±ä»ìÂÒÁË£¬Õâ¸öÎÊÌâ±È½ÏÑÏÖØ¡£ÒòΪcreat ......
ÍøÉÏÄܲ鵽ºÜ¶àÀàËÆ×ÊÁÏ£¬µ«ÍêÕûÐÔ²»¸Ò¹§Î¬¡£ÒÔÏÂÊǽâ¾ö·½°¸¼°Òªµã£º
·½·¨Ò»£º
ͨ¹ýurlµÄ·½Ê½Ïòflex´«²ÎÊý
µÚ1²½£ºÔÚÍøÒ³ÖÐÉèÖÃÒ»¸öÁ´½Ó£¬Èç <a
href="test.jsp?p1=test1&p2=test2">²âÊÔÁ´½ÓÒ»</a>£¬ÆäÖÐtest.jspǶÈëÁË
flash
µÚ2²½£º»ñÈ¡²ÎÊý
var params:Object
=URLUtil.parseUrlPara ......
¹ØÓÚflexÈçºÎÏòij¸öÒ³Ãæ´«µÝ²ÎÊý£¬ÎÒÒÔÇ°ÓÐÕâ·½ÃæµÄ±Ê¼Ç£¬flexͨ
¹ý·ÇAmfPHP;¾¶Óëºǫ́½»»¥
ÖÐURLLoader+URLRequest+URLVariables·½·¨Ò²¿ÉÒÔÓÃÓÚÏòflexÒ³Ãæ´«²ÎÊý¡£ºó
̨php¶Ë½ÓÊÕ²ÎÊýºÜ¼òµ¥£¬ÏÖÔÚÌÖÂÛÒ»ÏÂflex¶ËÈçºÎ´¦ÀíÒ³Ãæurl´«µÝ¹ýÀ´µÄ²ÎÊý¡£
ÍøÉÏÕâ·½ÃæÎÄÕ²»ÉÙ£¬²»¹ý¶¼¶àÉÙÓÐЩÎÊÌ⣬ÎÒ×ܽáһϣ¬Ð´ÔÚÕâÀï¡£
·½· ......
/**=========main.mxml=========*/
/* µ¼³öexcel */
private function exp():void{
if(dgEnterprise.dataProvider==null){
Alert.show("Êý¾ÝΪ¿Õ£¬ÎÞ·¨µ¼³öexcel","ÓÑÇéÌáʾ");
}else{
ExportExccel.loadDGInExcel(dgEnterprise,"/ssfxSystem/excelexport.jsp?tableName=ÆóÒµÐÅÏ¢");
}
}
/**===== ......
תÔØ×Ô http://amberoracle.blog.163.com/blog/static/10598633820097262242474/
µÚÒ»²½£ºÐ´ASÀà¼Ì³Ðmx.validators.Validator ,²¢µ¼Èëmx.validators.ValidationResult.
valueÖдæ·ÅÐèÒªÑéÖ¤µÄÄÚÈÝ
resultsÊý×éÖдæ·ÅÑéÖ¤ºóµÄ½á¹û£¬Èç¹ûͨ¹ýÑéÖ¤£¬Êý¾ÝΪ¿Õ£»Èç¹ûÑé֤ʧ°Ü£¬Êý×éÖÐÊÇValidationResult.¶ÔÏó£¬ÄÚº¬Ê§°Ü ......