Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Flex Mobile Mediation Strategy > A Flex Mobile Example

A Flex Mobile Example

Let’s consider an application where you can log in, view a list of your Things, maintain your Things, or see a screen with information like what version of the app you are running, how much free space your mobile device has, and how much space your Things are currently taking up.

You have a LoginView as your app’s firstView. Once logged in, you move to a ListView, where you can see a list of your Things. From there, you can either log out (taking you back to the LoginView), see information about the app in an InfoView, or edit one of your Things in the FormView.

The ListView might take a while to render, especially once you have a lot of Things. You will want to set destructionPolicy="never" on it so that it does not get destroyed when you push an InfoView or FormView on top of it. When you pop back to the ListView from the InfoView or FormView, the same mediated ListView will be shown. However, when you log out, the ListView will be popped off the ViewNavigator and destroyed, which makes sense because if you log in as someone else you do not want the previous list in memory anyway. Also, to demonstrate the ability to pass data to a View when pushing it, the InfoView will take an InfoVO. We will assume that the other Views get their data from their Mediators in the usual way.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial