保存的工作流程被设计去适应web的异步服务。当part发出partDosave事件时,要先初始化它的save服务,通常,开发者会在partDoSave前,调用partEvent#sendBusy方法去显示busy动画。
当用户试图去关闭dirty part时,potomac会派发partDoSave事件。Potomac直到它收到partSaveComplete事件时才会关闭part。如果potomac 收到partSaveError事件,它会退出保存过程。当save error发生,part的作者被期望在part UI上提供反馈。开发人员使用Alert或其他对话框显示此反馈。Potomac可以处理多个part,在同一个save cycle,因此,多个alert对话框被层叠的显示。开发者应该为每个part提供UI控件去显示错误信息。
个人理解save Cycle,可能还有保存的时间循环机制,因为actionScript是基于事件机制,而且是单线程,个人觉得保存可能存在轮询。
Example:
public var myHTTPService:HTTPService = ...;
[Handles(event="partDoSave")]
public function save(event:PartEvent):void
{
PartEvent.sendBusy(this,"Saving Record...");
myHTTPService.send(...);
}
[Handles(source="myHTTPService",event="result")]
public function saveSuccess(e:Event):void
{
PartEvent.sendIdle(this);
PartEvent.sendSaveComplete(this);
}
[Handles(source="myHTTPService",event="fault")]
public function saveError(e:Event):void
{
PartEvent.sendIdle(this);
PartEvent.sendSaveError(this);
errorText.visible = true;
errorText.text = "Help, I've fallen and I can't get up. ";
}
分享到:
相关推荐
NULL 博文链接:https://zhenghuazhi.iteye.com/blog/869964
赠送jar包:osgi-resource-locator-1.0.1.jar; 赠送原API文档:osgi-resource-locator-1.0.1-javadoc.jar; 赠送源代码:osgi-resource-locator-1.0.1-sources.jar; 赠送Maven依赖信息文件:osgi-resource-locator...
spring-osgi-1.2.1-with-dependencies.zip spring-osgi-1.2.1-with-dependencies.zip spring-osgi-1.2.1-with-dependencies.zip
spring-osgi-1.2.0-rc1-with-dependencies.zip
赠送jar包:osgi-resource-locator-1.0.1.jar; 赠送原API文档:osgi-resource-locator-1.0.1-javadoc.jar; 赠送源代码:osgi-resource-locator-1.0.1-sources.jar; 赠送Maven依赖信息文件:osgi-resource-locator...
spring-osgi-1.2.0-with-dependencies.zip spring-osgi-1.2.0-with-dependencies.zip spring-osgi-1.2.0-with-dependencies.zip
spring-osgi-1.2.1-with-dependencies完整包
OSGi-lib.rar OSGi-lib.rar OSGi-lib.rar OSGi-lib.rar
osgi enterprise-6
OSGI实战-若干问题.txtOSGI实战-若干问题.txt
OSGi开发文档和实践指南,描述了OSGI的开发流程
Felix_OSGi实作,介绍最流行的OSGI framwork-Felix的好文档
maven-osgi-plugin-launcher-framework-equinox-1.0.15.jar
java-goinstant-auth.zip,Java应用程序的GoInstant身份验证。Java应用程序的GoInstant身份验证
spring1.2的包文件 spring-osgi-1.2.0.zip
标签:atlassian-plugins-osgi-2.6.0.jar.zip,atlassian,plugins,osgi,2.6.0,jar.zip包下载,依赖包
spring-osgi-core-1.2.1.jar spring-osgi-core-1.2.1-sources.jar spring-osgi-extender-1.2.1.jar spring-osgi-extender-1.2.1-sources.jar spring-osgi-io-1.2.1.jar spring-osgi-io-1.2.1-sources.jar spring-...
jar包,亲测可用
osgi-webservice教程 教授你如果通过osgi架构开发java的webservice