加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

flex Cairgorm与J2EE实现的登录及问题

发布时间:2020-12-15 01:32:00 所属栏目:百科 来源:网络整理
导读:? 源码结构如上,遇到的主要问题有: 1144: 接口方法 onResult (位于命名空间 com.adobe.cairngorm.business:Responder 中)是通过类 ?business.commands:LoginCommand 中不兼容的签名实现的。---经检查发现com.adobe.cairngorm.business.Responder 的Respond

?
源码结构如上,遇到的主要问题有:
1144: 接口方法 onResult (位于命名空间 com.adobe.cairngorm.business:Responder 中)是通过类
?business.commands:LoginCommand 中不兼容的签名实现的。---经检查发现com.adobe.cairngorm.business.Responder 的Responder接口中函数及参数为onResult(event:*=null),onFault(event:*=null),参数必须为event:*=null。
在delegate包里的文件以及commands包的文件中在使用Responder时要注意:
Respoder接口有2个:一个是com.adobe.cairngorm.business.Responder 这个,一个是mx.rpc.IResponder。对于第一个,在command文件里继承此接口时,对应的函数为onResult(event:*=null),并且在services.mxml中需加入如下
红色部分

services.mxml

<?xml version="1.0" encoding="utf-8"?>?
<rds:ServiceLocator xmlns:rds="com.adobe.cairngorm.business.*"???
?????xmlns:mx=" http://www.adobe.com/2006/mxml">?
?<mx:RemoteObject???
??id="userService"???
??destination="userServiceDestination"???
??endpoint=" http://localhost:8080/FlexCairngorm2/messagebroker/amf"
??showBusyCursor="true"
?? result="event.token.resultHandler( event );"
??fault="event.token.faultHandler( event );">?
?</mx:RemoteObject>?
</rds:ServiceLocator>?
对于第二个,command在继承接口时,需实现函数result,fault,参数可以为event:Object,
两种方法均是通过event.result获取返回的数据。
在view中需要显示的数据均要在ModelLocator中有定义以及初始化。,可以建立多个modelLocator,或一个结合多个Model

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读