//弹性类
package com.mycompany{
import flash.utils.Dictionary;
[Bindable]
[RemoteClass(alias="com.mycompany.bean.MessageBundle")]
[Bindable]
public class MessageBundleVO{
public var messages:Object ;
public function getMessage(key:String):String{
return messages.key as String;
}
}
}
//Java类
package com.mycompany.bean;
import java.io.Serializable;
import java.util.Map;
public class MessageBundle implements Serializable {
private static final long serialVersionUID = 1L;
private Map messages;
public Map getMessageBundle() {
return messages;
}
public void setMessageBundle(Map messageBundle) {
this.messages = messageBundle;
}
public String toString(){
return messages.toString();
}
}
一切都正确链接,MessageBundleVO 的实例不为空,但其属性消息为空。
如果我们在上面的代码中使用 RemoteClass 标签,你能告诉我什么是 Map 的 Flex 等价物。
这在 flex 方面是空的。MessageBundleVO.messages
The Aodbe
http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_4.html
is suggesting
Array (sparse)—->java.util.Map–>java.util.Map