16.2. Value Objects

Since the process of login centers around the idea of a user, you will use the existing UserVO to represent the current user. Upon successful login, the user object returned from the login services will be used to populate a currentUser property on the ModelLocator.

Add the following property to the FlexBlogModel:

public var currentUser:UserVO;

Make sure that Flex has added the following import statement for you:

import com.FlexBlog.valueobjects.UserVO;

Since the login process once again requires you to display notifications to the user, you will also be making use of the UserNotificationVO in the command classes to set the userNotification property of the ModelLocator.

Get Professional Cairngorm™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.