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

about Flex DataGrid edit

Summary(¸ÅÊö)£º Adobe Flex µÄ dataGrid ÓкÜÇ¿´óµÄ¹¦ÄÜ£¬±ÈÈçItemRenderer,headerRendererµÈ£¬¿ÉÒÔ·½±ãµØʵÏÖ×Ô¼ºÏëÒªµÄ¹¦ÄÜ¡£µ«¶ÔdataGridÖ±½Ó±à¼­²¢±£´æµ½Service¶Ë£¬¾ÍÓеãÂé·³ÁË¡£
Requirement(ÐèÇó)£º ¶ÔdataGrid½øÐе¥Î»¸ñ±à¼­£¬ÈôÓб仯£¬±£´æµ½Service; ·ñÔò²»±£´æ¡£
Solution(½â¾ö·½°¸): ÔËÓÃDataGrid µÄ itemEditBegin ʼþ¡¢itemFocusOut ʼþ¡£
1.  when the itemEditBegin is dispatched, the event handler should save this cell value as old value.(±à¼­Ç°±£´æ¾ÉÖµ)
2. when the listener of itemFocusOut is responding, you should check the current cell to the old value. If it's value have changed, you should save the new value to Service.(±à¼­ºóÅжϣ¬ÊÇ·ñ¸ü¸Ä¡£)
Example(Àý×Ó)  as follow:
<mx:Script>
        <![CDATA[
private var oldValueOfEditedItem: CreditVO;
   private function creditDGEditBegin(event: DataGridEvent): void {
             oldValueOfEditedItem = (event.itemRenderer.data as CreditVO).clone() as CreditVO;
            }
            private function editedItemChanged(newValue: CreditVO): Boolean {
             return (newValue.amount != oldValueOfEditedItem.amount)|| 
               (newValue.description != oldValueOfEditedItem.description);
            }
            private function creditDGEditEnd(event: DataGridEvent): void {
             var newValue: CreditVO = event.itemRenderer.data as CreditVO;
             if (editedItemChanged(newValue)) {
             dispatchEvent(new UpdateCreditEvent(newValue))
             }
            }
  ]]>
   &


Ïà¹ØÎĵµ£º

Flex ºÍ.NETЭͬ¿ª·¢ÀûÆ÷FluorineFx

 ÔÚ±¾ÏµÁÐÇ°Ã漸ƪÎÄÕÂÖзֱð½éÉÜÁËͨ¹ýWebService¡¢HTTPService¡¢URLLoaderÒÔ¼°FielReferenceµÈ×é¼þ
»òÀàÀ´Íê³ÉFlexÓë.NET·þÎñ¶ËµÄͨÐŵÄÏà¹Ø֪ʶµã¡£Í¨¹ýÕâЩ·½Ê½À´Íê³ÉÓë·þÎñ¶ËµÄͨÐÅÊǷdz£·½±ãºÍ¼òµ¥µÄ£¬µ«ÓÐËûµÄȱµã¾ÍÊÇͨÐÅÊý¾ÝÁ¿½ÏС£¬ÈçÒª´«
Êä´óÁ¿µÄÊý¾Ý»òÊÇʵÏÖ²»Í¬¶ÔÏóµÄÐòÁл¯´«Ê䣬ËüÃÇÔòÂú×ã²»ÁËÎÒÃǵ ......

JavaFX£¬FlexºÍSilverlightºáÏò¶Ô±È


һλFlexºÍJavaFXµÄRIA¿ª·¢ÕßÔÚ±¾ÆªÎÄÕÂÖжÔFlex£¬JavaFXºÍSilverlightµÄ¹¦ÄܺÍÓÅȱµã¸÷×Ô×ö³öÁËÆÀÂÛ¡£JavaFX1.1ÓÚ½ñÄê2Ô·¢²¼£¬2.0°æµÄ·¢²¼Ò²ÕýÔڼƻ®ÖС£
Flex, JavaFX, Silverlight…
̹°×À´Ëµ£¬ÔÚ¿ª·¢Õâ¸öÓ¦ÓÃÆڼ䣬ÎÒÔÚÄÚÐÄÒ»Ö±ÔڱȽÏÓÃJavaFX×öÓëÓÃAdobe Flex×öͬÑùµÄÊÂÇé¡£
¼òµ¥ËµÀ´£¬ÔÚ½ñÌ죬 Flex±ÈJav ......

flex serverÏîÄ¿µÄ·¾¶ÅäÖÃ

Root folder
Õâ¸öĿ¼Ӧ¸ÃÌîдtomcatĿ¼Ï£¬ÄǸöjavaÏîÄ¿µÄËùÔÚλÖã¬Èç¹ûΪ´í£¬»á³öÏÖ“ Invalid root. The WEB-INF/flex folder must contain either flex-config.xml or services-config.xml.”ËüÌáʾ¸ÃĿ¼WEB-INF²»´æÔÚflex-config.xml»òservice-config.xmlÎļþ£¬Èç¹ûÊÇÒ»¸öÕý³£µÄjavaÏîÄ¿£¬¾Í»áÓÐÕâ¸öÎļ ......

Flexͨ¹ýjavascript¶Áдcookie

×î½üÓöµ½¸öÎÊÌ⣬¿ª·¢webÏîÄ¿µÄʱºò£¬¿ÉÄÜflexÖ»ÓÃÀ´ÊµÏÖÏîÄ¿µÄ²¿·ÖÄ£¿é¡£µ±flexÐèÒªÔÚ¿Í»§¶ËдÈë/¶ÁȡһЩ״̬ÐÅÏ¢µÄʱºò£¬ÎÒÃÇ»áÏëµ½ÓÃcookie¡£flexÊDz»Ö§³ÖcookieµÄ£¬Ö»ÓÐSharedObjectÕâ¸ö±¾µØ¶ÔÏó¡£ËùÒÔ½â¾öµÄ°ì·¨¾ÍÓÐÁ½¸ö£º
flexͨ¹ýµ÷ÓÃjsÀ´ÊµÏÖ¶ÔcookieµÄ²Ù×÷£»
jsͨ¹ýflexʵÏÖ¶ÔSharedObjectµÄ²Ù×÷£»
ÕâÁ½ÖÖ·½·¨ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ