
STEP 8: CREATE THE ACCOUNT MANAGER USER INTERFACE
AND APPLICATION LOGIC
Create the Account Manager user interface in a new file called AccountsView.mxml.
1. Click File > New > MXML Component and enter AccountsView in the Name field. The file opens in Adobe Flash Builder.
You'll modify its default code to implement the Account Manager application logic.
2. Remove the width and height attributes in the Group component and Declarations component.
3. Add a flexforforce namespace attribute.
<s:Group
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:flexforforce="http://flexforforce.salesforce.com">
4. In the Group component, add the following components, which specify the user interface layout and components, and contain
the ActionScript that manages the operations in the main application window.
<s:layout>
</s:layout>
<fx:Script>
<![CDATA[
]]>
</fx:Script>
<s:states>
</s:states>
<s:VGroup
width="100%"
height="100%"
paddingBottom="10"
paddingLeft="10"
paddingRight="10"
paddingTop="10">
</s:VGroup>
<flexforforce:StatusBar/>
5. In the layout component, add a VerticalLayout component to set up the vertical orientation of the user interface elements
in the main window.
<s:layout>
<s:VerticalLayout/>
</s:layout>
6. In the States component, add State components with name attributes for the following states:
•
Default—Displays the main interface including a list of records
16
Kommentare zu diesen Handbüchern