Chapter 14. Implementing view states

 

This chapter covers

  • Understanding view states
  • Using view states in Flex
  • Bringing it together

In previous chapters, you learned about controls, containers, layouts, and various other features incorporated within Adobe Flex and how you can use these tools to build RIAs.

In this chapter, we’ll explore another important feature: view states. With view states, you can build RIAs that impart a polished and satisfying user experience. Before we jump into Flex-specific view state features, let’s discuss the concept of view states in general.

14.1. Understanding view states

An RIA’s UI consists of different views. Traditional websites consist of stateless, or static, pages (such as HTML pages).

Views can take on different visual appearances and representations depending on the conditions in which they’re presented. An example of a condition is a user input, such as picking an item from a drop-down list or clicking a button. Other examples include your application responding to a request sent to a server or the result of an algorithm. A simple application might have only one view with some states, whereas complex applications might have several views, each with different states.

A view state can be defined as a particular visual appearance, behavior, and representation for a view (UI).

Views have at least one state, which is known as the default or base state of the view. You can define any number of additional states depending on your requirements.

14.2. View states in Flex

14.3. Bring it together

14.4. Summary