Flex Êý¾ÝÒ×·¸´íÎó: ³£¼ûÎóÓúʹíÎó
Íü¼Ç½â³ýºÍ³Ðµ£ÄÚ²éй©·çÏÕ
Äã¿ÉÒÔÔÚ MXML ÖÐʹÓà ±ê¼Ç»ò´óÀ¨ºÅÒÔ±ãʵÏְ󶨹¦ÄÜ£¬È»¶øÕâЩ·½·¨½«»á²úÉú¿ªÏú¡£´ËÍ⣬Äã²»Äܹ»Ê¹ÓÃÕâЩ¼¼ÊõÈ¥³ý°ó¶¨¡£Èç¹ûÄãÏ£Íû¶Ô¸ßÐÔÄÜÓ¦ÓóÌÐò½øÐÐÓÅ»¯£¬Äã¿ÉÒÔʹÓà BindingUtils ÀàÀ´°ó¶¨ÄãµÄ¶ÔÏó¡£ BindingUtils ÀàµÄʹÓ÷½Ê½ÓÐÁ½ÖÖ£º
bindProperty() ·½·¨ÊÇÓÃÓڰ󶨹²ÓÐÊôÐԵľ²Ì¬·½·¨¡£
bindSetter() ·½·¨ÊÇÓÃÓÚ°ó¶¨setterº¯ÊýµÄ¾²Ì¬·½·¨¡£
ÈÃÎÒÃÇÀ´¿´Ò»ÏÂbindProperty ·½·¨Ç©Ãû£º
public static function bindProperty(
site:Object, prop:String,
host:Object, chain:Object,
commitOnly:Boolean = false,
useWeakReference:Boolean = false):ChangeWatcher
Õ¾µãºÍÖ÷»ú²ÎÊý·Ö±ð±íʾĿµÄµØºÍÔ´¶ÔÏó¡£µ±´¦Àí³ÌÐòÖ»»ùÓÚ³Ðŵ¸ü¸Äʼþ£¨committing change event£©µ÷ÓÃʱ£¬Äã¿ÉÒÔ½« commitOnly ÉèÖÃΪtrue£»¶øµ±´¦Àí³ÌÐòÄܹ»»ùÓÚ³ÐŵºÍ·Ç³Ðŵ¸ü¸Äʼþ£¨committing and non-committing change event£©µ÷ÓÃʱ£¬Äã¿ÉÒÔ½«commitOnly ÉèÖÃΪ false£¨Ä¬ÈÏÉèÖã©¡£
useWeakReference ²ÎÊýÔÊÐíÄ㶨Òåµ½Ö÷»úµÄÒýÓÃÊÇstrong»¹ÊÇweak¡£strong ÒýÓÃ(ĬÈÏ) Äܹ»·ÀÖ¹Ö÷»ú±»À¬»øÊÕ¼¯¡£¶øweak ÒýÓò»ÄÜ×öµ½ÕâÒ»µã¡£ÏÂÃæµÄ·¶Àý°üº¬Ò»¸ötextÊäÈë³ÌÐòºÍÒ»¸ö¼òµ¥×é¼þ¡£µ±¶Ô TextInput ¿Ø¼þ½øÐÐÔ¤³õʼ»¯Ê±£¬µ÷ÓÃʹÓà bindProperty ·½·¨µÄ preinitializeHandler() º¯Êý¡£
<?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="1024" minHeight="768">
<fx:Script>
<![CDATA[
import mx.binding.utils.BindingUtils;
import mx.events.FlexEvent;
protected funct
Ïà¹ØÎĵµ£º
String userId = request.getParameter("userId");
System.out.println(userId);
response.setCharacterEncoding("UTF-8");
//response.getWriter().println("hello world -- ÎÒ°®Äã¡£¡£¡£");
String xml = "<user>" +
"<username>Ìθç</username>" +
"</user>";
respon ......
×î½ü¹«Ë¾Òª×ö¸öÅÄÂôÐеÄÏîÄ¿£¬ÎÒ±»·ÖÅäÁ˓ʵʱÒôÊÓƵֱ²¥¼°µã²¥”µÄ²¿·Ö¡£ÎÒÒ»Ö±´ÓÊÂJAVAÖØÀ´Ã»Ñо¿¹ýadobeµÄ¶«Î÷£¬ËäÈ»sun£¨ÏÖÔÚÊÇORACLEÁË£©Ò²ÓÐJMF£¬µ«ÊÇÕâ¸ö¶«Î÷Ôç¾ÍÔÝÍ£¸üÐÂÁË£¬¸Ð¾õÒѾÓëʱ´úÍѽڡ£×îºó¾¹ýÎÒÃÇ¿ª·¢ÈËÔ±¶¼ÓеĿ̿àרÑУ¬ÂñµØ¿à¸ÉµÄ¾«ÉñÖÕÓÚÔÚÒ»¸öÀñ°Ý¸ã¶¨ÁË¡£
Ïл°ÉÙ˵£¬ÎÒÃÇÇÐÈëÕýÌâ
¿ ......
Í϶¯Ë®Æ½¹ö¶¯ÌõÀ´¸Ä±äͼƬ´óС¡£
<?xml version="1.0"?>
<!--
Simple example to demonstrate the HSlider control.
ˮƽÍ϶¯Ìõ¡£
MyShareBook.cn ·Òë   ......