FLEXʹÓÃjavaÁ¬½ÓÊý¾Ý¿â,Éú³ÉtreeÊ÷
×î½ü¼¸Ìì,Ò»Ö±ÔÚÑо¿flex,˵¾äʵÔÚµÄ,ÆäÖеĿàÄÕ²»ÊÇÒ»¾ä»°Á½¾ä»°ÄÜ˵Çå³þµÄ.ûÓнӴ¥¹ý°¡!²»¹ýÏÖÔÚ×ÜËãÊÇ°ÑÊý¾Ý¿âÁ¬ÉÏÁË,×ö³öÁË×Ô¼ºÏëÒªµÄ¶«Î÷.·Ï»°ÉÙ˵,ÏÖÔÚÄØ,ÎҾͰÑÎÒ×öµÄ´úÂëÌù³öÀ´,¸ø´ó¼Ò¿´¿´,¶àÌᱦ¹óÒâ¼û.
ÎÒÓõÄÊÇjdbcµÄÁ¬½Ó·½Ê½(hibernateµÄÁ¬½Ó·½Ê½ÎÒ¿´ÍøÉÏÓÐ,ËùÒԾͲ»Ìù³öÀ´ÁË)
1.flex´úÂë
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="begin()">
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
import flash.events.MouseEvent;
import mx.controls.*;
public function begin():void{
getitem.Toxml();
}
[Bindable]
public var selectedNode:XML;
[Bindable]
public var XMLData:XMLList;
private function resultHandler(event:ResultEvent):void{
//textarea.text=event.result.toString();
XMLData = new XMLList(event.result.toString());
myTree.dataProvider = XMLData.folder;
}
public function DealFault(event:FaultEvent):void{
Alert.show(event.fault.toString());
trace(event.fault);
}
]]>
</mx:Script>
<mx:RemoteObject id="getitem" destination="getItem" showBusyCursor="true" endpoint="http://localhost:8080/firstFlex/messagebroker/amf/" fault="DealFault(event)" result="resultHandler(event)"/>
<mx:Tree id="myTree" labelField="@label" width="100%" height="100%"/>
</mx:Application>
ÔÚÕâÀïҪעÒâ,<mx:RemoteObject >Õâ¸ö±êÇ©,ÊÇÓÃÀ´Á¬½ÓÊý¾Ý¿âµÄ,ûÓÐËü¾Í²»¿ÉÄÜÁ¬ÉÏ.»¹ÓбêÇ©ÀïÃæµÄendpointÕâ¸öÊôÐÔ,ÊDZز»¿ÉÉÙµÄ,ËüµÄÖµÀ¶É«¼Ó´ÖµÄ²¿·ÖΪÏîÄ¿Ãû³Æ,»ÆÉ«¼Ó´ÖµÄ²¿·ÖÊÇÔÚÏîÄ¿web.xmlÖеÄ
<servlet-mapping>
<servlet-name>MessageBroke
Ïà¹ØÎĵµ£º
ÐèÇóÈçÏ£º
µ±AIRÆô¶¯ºó£¬¼àÌýÈ«¾Ö¼üÅÌʼþ£¬¼´this.addEventListener( KeyboardEvent.KEY_DOWN, keydownHandler );
ÔËÐкóЧ¹û£º
µ±AIRÔËÐкó£¬ËäÈ»ÕýÈ·¼àÌýÁËKeyboardEvent.KEY_DOWN event£¬µ«ÊDZØÐëÒªÊó±êµã»÷Ò»ÏÂAIR²Å¿ÉÒÔ»ñÈ¡keydownHandler¡£
ÔÒò£º
1¡¢keydownHandlerµÄ»ñÈ¡ÐèÒª¼àÌýµÄ¶ÔÏó»ñµÃ½¹µã£¬µ±mouse cl ......
javaÉÏ´«Îļþ
ÐèÒªµÄµÚÈý·½jar°üÓУ¨ÕâÀïʹÓÃapacheµÄ£©
apacheµÄcommons-fileupload£¨ÉÏ´«Óã©£¬commons-io £¨listenerÇåÀíÀàÓã© £¬ commons-beanutils£¨¿ÉÑ¡£©
¾ßÌå²Ù×÷
FileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);
if(ServletFileUp ......
Java
Á÷²Ù×÷
¶ÔÓÚÎÒÃdz£ÓõÄGBKÖУ¬Ó¢ÎÄÊÇÕ¼ÓÃ1¸ö×Ö½Ú£¬ÖÐÎÄÊÇ2¸ö
¶ÔÓÚUTF-8£¬Ó¢ÎÄÊÇ1¸ö£¬ÖÐÎÄÊÇ3¸ö
¶ÔÓÚUnicode£¬Ó¢ÎÄÖÐÎĶ¼ÊÇ2¸ö
Java
µÄÁ÷²Ù×÷·ÖΪ×Ö½ÚÁ÷ºÍ×Ö·ûÁ÷Á½ÖÖ¡£
1¡¢
×Ö½ÚÁ÷
ËùÓеĶÁ²Ù×÷¶¼¼Ì³Ð×ÔÒ»¸ö¹«¹²³¬Àà
java
.io.InputStream
Àà¡£
ËùÓеÄд²Ù×÷¶¼¼Ì³Ð×ÔÒ ......
JAVA¿ª·¢Õß×ȥµÄ20¸öÓ¢ÎÄÍøÕ¾
1.[http://www.javaalmanac.com] – Java¿ª·¢ÕßÄê¼øÒ»ÊéµÄÔÚÏß°æ±¾. ÒªÏë¿ìËٲ鵽ijÖÖJava¼¼ÇɵÄÓ÷¨¼°Ê¾Àý´úÂë, ÕâÊÇÒ»¸ö²»´íµÄÈ¥´¦.
2.[http://www.onjava.com] – O’ReillyµÄJavaÍøÕ¾. ÿÖܶ¼ÓÐÐÂÎÄÕÂ.
3.[http://java.sun.com] – ¹Ù·½µÄJava¿ª·¢ÕßÍøÕ¾ &ndash ......
Java™ ÓïÑÔ°üº¬Á½ÖÖÄÚÔÚµÄͬ²½»úÖÆ£ºÍ¬²½¿é£¨»ò·½·¨£©ºÍ volatile ±äÁ¿¡£ÕâÁ½ÖÖ»úÖƵÄÌá³ö¶¼ÊÇΪÁËʵÏÖ´úÂëÏ̵߳ݲȫÐÔ¡£ÆäÖÐ Volatile ±äÁ¿µÄͬ²½ÐԽϲµ«ÓÐʱËü¸ü¼òµ¥²¢ÇÒ¿ªÏú¸üµÍ£©£¬¶øÇÒÆäʹÓÃÒ²¸üÈÝÒ׳ö´í¡£ÔÚÕâÆÚµÄ Java ÀíÂÛÓëʵ¼ù
ÖУ¬Brian Goetz ½«½éÉܼ¸ÖÖÕýȷʹÓà volatile ±äÁ¿µÄģʽ£¬²¢Õ ......