ʹÓÃFabrication+PureMVC¿ª·¢multi modular FlexÓ¦ÓÃ
PureMVCʵÏÖÁ˼òµ¥µÄMVC¿ò¼Ü£¬½«Ó¦Ó÷ÖΪmodel¡¢viewºÍcontrolÈý²¿·Ö¡£
ºÃ´¦ºÜ¶àÁË£¬½µµÍÁËÄ£¿éÖ®¼äµÄñîºÏÐÔ¡¢Ìá¸ßÁ˳ÌÐòµÄ¿Éά»¤ÐԺͿÉÀ©Õ¹ÐÔ¡£
fabricationÔÚPureMVC»ù´¡ÉÏ×öÁËÀ©Õ¹£¬¼ò»¯ÁËpureMVCµÄ¿ª·¢ÄѶȣ¬ÏÂÃæ¼òµ¥½éÉÜÒ»ÏÂfabricationµÄ¿ª·¢¹ý³Ì¡£
Ê×ÏÈ£¬¸ù¾ÝÐèҪʵÏÖorg.puremvc.as3.multicore.utilities.fabrication.components.FlexModule¡¢FlexApplication¡¢FlashApplication»òÕßAirApplication¡£Õâ¾ÍÊÇViewÁË¡£
ÔÚViewÖÐʵÏÖoverride public function getStartupCommand():Class ·½·¨¡£·µ»Ø³õʼ»¯CommandÀ࣬ÈçÏ£º
public class ConfigModuleStartupCommand extends SimpleFabricationCommand {
override public function execute(note:INotification):void {
registerProxy(new GetPropertyProxy());
registerCommand(ShellConstants.USERINFO_FIND, FindUserInfoCommand);
registerMediator(new ConfigModuleMediator(note.getBody() as ConfigModule));
}
}
ÔÚ³õʼ»¯ÀàÖУ¬ÐèҪע²áËùÐèÒªµÄProxy¡¢CommandºÍMediator£¬ProxyÖ÷ÒªÓÃ×÷ºÍºǫ́½øÐн»»¥£¬²éѯºÍÐÞ¸ÄÊý¾Ý£¬Õâ¾ÍÊÇmodelÁË¡£
CommandÓÃ×÷½ÓÊÕViewÖеÄʼþ£¬²¢×ö´¦Àí£¬Ò»°ãÇé¿öϾÍÊǵ÷ÓÃProxyµÄ·½·¨¡£ÈçÏ£º
public class GetPropertyCommand extends SimpleFabricationCommand {
override public function execute(note:INotification):void {
var getPropertyProxy:GetPropertyProxy = retrieveProxy(GetPropertyProxy.NAME) as GetPropertyProxy;
getPropertyProxy.fetchProperty();
}
}
µ±Proxy·½·¨µÃµ½ºǫ́·´À¡ºó£¬»á³ö·¢³É¹¦»òʧ°ÜµÄʼþ¡£ÈçÏ£º
public class GetPropertyProxy extends FabricationProxy
{
static public const NAME:String = "GetPropertyProxy";
private var _remoteService:RemoteObject;
public function GetPropertyProxy(name:String = NAME, data:Object = null)
{
super(name, data);
setup();
}
private function setup():void{
_remoteService = new RemoteObject();
_remoteService.destination = "sysService";
_remoteService.showBusyCursor = true;
_remoteService.addEventListener(ResultEvent.RESULT, result);
_remoteService.addEventListener(FaultEvent.FAULT, failed);
}
p
Ïà¹ØÎĵµ£º
2010.2.21 ³õ²½Ó¡Ïó
1. Flex¹¤³ÌµÄºËÐľÍÊÇÄǸömxmlÎļþ£¬ËùÓеĴúÂë»ò½á¹¹¶¼ÊÇÎ§ÈÆËü£»
2. ÓëÕâ¸ömxmlÎļþͬÃûµÄasÎļþ£¬ËûÃÇÖ®¼äµÄ¹ØÏµÓеãÏñhtmlÓëjsµÄ¹ØÏµ£¬¶øÇÒ»¹²»ÓÃinclude£»
3. ×îÖÕ»áÉú³ÉÒ»¸öÓëmxmlÎļþͬÃûµÄhtmlÎļþ£¬¶øflashÎļþ»á±»Ç¶Èë½øÈ¥µÄ£»
2010.2.22 ÓëSping,Hibernate¼¯³É
¿´ÁËÕâÆªÎÄÕ£ºhttp://w ......
Flex¿ª·¢ÕßÐèÒªÖªµÀµÄ10¼þÊÂ
×÷Õß ÕÅÁú ·¢²¼ÓÚ 2010Äê2ÔÂ18ÈÕ ÉÏÎç1ʱ25·Ö
ÉçÇø Java Ö÷Ìâ ¸»¿Í»§¶Ë/×ÀÃæ ±êÇ© Flex, Flash
²»¾Ãǰ£¬Michael Portuesi·¢±íÁËһƪ²©ÎÄ£¬Ì¸µ½ÁËFlex¿ª·¢ÕßÐèÒªÖªµÀµÄ10¼þÊ¡£ÎÄÕ½éÉÜÁËÿ¸ö½øÈëFlexÁìÓòµÄ¿ª·¢Õß¶¼ÐèÒªÕÆÎյĻù±¾ÖªÊ¶Óë¼¼ÄÜ¡£
Michael Portuesi¸ø³öµÄ10¸öÌõÄ¿ÖУ¬ÓÐЩÊÇ¿ ......
¹¤³ÌϵÄhistoryÎļþ¼ÐÏ´æ·ÅÈý¸öÎļþ£ºindex.template.html£¬rightClick.js,swfobject.js
srcÎļþ¼ÐÏ´æ·ÅCustomContextMenu.mxmlÎļþ¡£
1.CustomContextMenu.mxml£º
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
applicati ......
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" creationComplete="initApp()">
<mx:Script>
<![CDATA[
public var pageRecordes:uint = 8;
public var totalPages:ui ......