flexͨ¹ýHTTPServiceÓëjavaͨÐŵÄСÀý×Ó
ÊʺϳõѧÕßÀí½â
1£¬testflex.mxml
<?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"
creationComplete="init()"
minWidth="955" minHeight="600">
<fx:Declarations>
<!-- ½«·Ç¿ÉÊÓÔªËØ£¨ÀýÈç·þÎñ¡¢Öµ¶ÔÏ󣩷ÅÔÚ´Ë´¦ -->
</fx:Declarations>
<fx:Script>
<!--[CDATA[
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.http.HTTPService;
[Bindable]
private var selectResponse:String= null;
[Bindable]
private var arraylist:ArrayCollection = new ArrayCollection([
{name:"CN",data:"ÖÐÎÄ"},
{name:"US",data:"Ó¢ÎÄ"},
]);
private function init():void{
// fService.addEventListener(ResultEvent.RESULT,successhandler);
// fService.addEventListener(FaultEvent.FAULT,faulthandler);
}
private function dropdownlistChangeHandler(event:Event = null):void{
var httpservice:HTTPService = new HTTPService();
httpservice.resultFormat = "text";
httpservice.url = "http://localhost:8080/testjava/flexServlet";
httpservice.method = "POST";
var param:Object = new Object;
param.selects = select.selectedItem.data;
httpservice.send(param);
httpservice.addEventListener(ResultEvent.RESULT,successhandler);
// fService.sendRequest(select.selectedItem.data);
// Alert.show(select.selectedItem.data);
}
private function successhandler(event:ResultEvent):void{
selectResponse = event.message.body.toString();
languages.text = selectResponse;
// Alert.show(selectResponse);
}
// private function faulthandler(event:FaultEvent):void{
// selectResponse = event.message.toString();
// languages.text = selectResponse;
// }
]]-->
</fx:Script>
<s:DropD
Ïà¹ØÎĵµ£º
ÉùÃ÷£º´ËÎÄÕÂÊÇÍøÉÏתÐ͹ýÀ´µÄ£¬·Ç±¾ÈËÖø¡£
1¡¢°´×Ö½Ú¶ÁÈ¡ÎļþÄÚÈÝ
2¡¢°´×Ö·û¶ÁÈ¡ÎļþÄÚÈÝ
3¡¢°´ÐжÁÈ¡ÎļþÄÚÈÝ
4¡¢Ëæ»ú¶ÁÈ¡ÎļþÄÚÈÝ
public class ReadfromFile {
/**
* ÒÔ×Ö½ÚΪµ¥Î»¶ÁÈ¡Îļþ£¬³£ÓÃÓÚ¶Á¶þ½øÖÆÎļþ£¬ÈçͼƬ¡¢ÉùÒô¡¢Ó°ÏñµÈÎļþ¡£
&n ......
ÔÚAndroidµÄÓ¦ÓóÌÐò¿ª·¢ÖУ¬Í¨³£Ê¹ÓõÄÊÇJAVAÓïÑÔ£¬³ýÁËÐèÒªÊìϤJAVAÓïÑԵĻù´¡ÖªÊ¶Ö®Í⣬»¹ÐèÒªÁ˽âAndroidÌṩµÄÀ©Õ¹µÄJAVA¹¦ÄÜ¡£
ÔÚÒ»°ãµÄJAVAÓ¦ÓÃÖУ¬Èç¹ûÐèÓÃÒýÓûù´¡Àà¿â£¬Í¨³£ÐèҪʹÓÃÈçϵķ½Ê½£º
import
javax.swing.*;
ÒÔÉÏ´úÂë±íʾÁËÒýÓÃJAVAµÄGUI×é¼þSwing,javax.swing¼´JAVAÖеÄÒ»¸ö°ü¡£
androidÌṩһР......
GRASPģʽ:General Responsibility Assignment Software Patterns£ºÍ¨ÓÃÔðÈηÖÅäÈí¼þģʽ
ÀïÃæÖØÒªµÄ¸ÅÄîÊÇÔðÈΣ¬ÔðÈÎÊÇÀà¼äµÄÒ»ÖÖºÏÔ¼»òÊÇÒåÎñ£¬¿ÉÒÔϸ·ÖΪÁ½²¿·Ö£¬Óù«Ê½±íʾÈçÏ£º
ÔðÈÎ = ÖªµÀÔðÈÎ + ÐÐΪÔðÈΣ¨ÕâÀïÃæËƺõ´æÔÚ¸ÅÄîµÄÑ»·¶¨Ò壩
×¢£ºÓÃͨË׵Ļ°À´½²£¬ÔðÈξÍÊÇÒ»¸öÀàÖªµÀÒª×öʲô£¬²¢ÇÒÄܹ»×öʲô¡£
· ......
ÉÏÎÄ̸µ½ÁËÊÊÅäÆ÷ģʽ£¬ÒªÊÇTargerÄ¿±ê½ÇÉ«ÓÐ20·½·¨£¬ÄÇôÿ¸öÊÊÅäÆ÷¶¼ÒªÈ¥ÊµÏÖ½Ó¿ÚÖÐÕâЩ·½·¨£¬ÕâÑù×ö¸Ð¾õÌ«·Ñ¾¢¡£ ÕâÖÖÇé¿öÏ£¬¿ÉÒÔ¿¼ÂÇʵÏÖ¸öĬÈÏÊÊÅäÆ÷£¬È»ºóʵ¼ÊµÄʵÏÖÄ¿±ê½ÇÉ«½Ó¿ÚµÄÀà¿ÉÒÔ¼¯³ÉÕâ¸öĬÈÏÊÊÅäÆ÷£¬È»ºóÖØдĬÈÏʵÏֵķ½·¨¼´¿É¡£ Ò»¡¢ÔÀíͼ ......
Ò»°ãÎÒÃÇÔÚjavaÖÐÔËÐÐÆäËüÀàÖеķ½·¨Ê±£¬ÎÞÂÛÊǾ²Ì¬µ÷Ó㬻¹ÊǶ¯Ì¬µ÷Ó㬶¼ÊÇÔÚµ±Ç°µÄ½ø³ÌÖÐÖ´Ðеģ¬Ò²¾ÍÊÇ˵£¬Ö»ÓÐÒ»¸öjavaÐéÄâ»úʵÀýÔÚÔËÐС£¶øÓеÄʱºò£¬ÎÒÃÇÐèҪͨ¹ýjava´úÂëÆô¶¯¶à¸öjava×Ó½ø³Ì¡£ÕâÑù×öËäȻռÓÃÁËһЩϵͳ×ÊÔ´£¬µ«»áʹ³ÌÐò¸ü¼ÓÎȶ¨£¬ÒòΪÐÂÆô¶¯µÄ³ÌÐòÊÇÔÚ²»Í¬µÄÐéÄâ»ú½ø³ÌÖÐÔËÐеģ¬Èç¹ûÓÐÒ»¸ö½ø³Ì·¢Éú ......