4、adobe.cairngorm.vo.IValueObject; 2. //一般情况下,我们需要实现框架中的IValueObject接口 3. public class UserVO implements IValueObject{ 4. //存放用户名 5. public var userName:String; 6. //存放密码 7. public var password:String; 8. } 9.} packageorg.rj
6、式的,并对比了java和actionscript3.0中不同的实现方式,如果还不是很了解的话大家可以去参考下。下面是改model类:Java代码1.package org.rjb.model 2.{ 3. import com.adobe.cairngorm.model.ModelLocator; 4. 5. import org.rjb.vo.UserVO; 6. [Bindable] 7. public class UserModelLocator implements ModelL
7、ocator 8. { 9. //存放vo对象 10. public var userVO:UserVO; 11. //存放一些状态变量 12. public var state:String="User---Login"; 13. //单例对象 14. private static var modelLocator:UserModelLocator; 15. 16. public static
8、 function getInstance():UserModelLocator{ 17. if(modelLocator==null){ 18. modelLocator=new UserM