
•
Create—Displays the user interface for creating a new account
•
Edit—Displays the user interface for editing the details of an existing account
The code should look like this:
<s:states>
<s:State name="default"/>
<s:State name="create"/>
<s:State name="edit"/>
</s:states>
7. In the VGroup component, add the following components:
•
HGroup—A horizontal group that will contain the buttons for creating new records, querying the local database, and
synchronizing with Salesforce.
•
Label—Displays the total number of records.
•
DataGrid—References the list of accounts through an ActionScript variable and presents the records in the user interface.
•
Fieldcontainer—Displays the user interfaces to either edit an existing account or create a new one.
The code should look like this:
<s:HGroup width="100%" verticalAlign="middle">
</s:HGroup>
<s:Label text="Displaying: {_gridDataProvider.length} account(s)"/>
<mx:DataGrid
id="_dataGrid"
width="100%"
height="100%"
resizeEffect="Resize"
dataProvider="{_gridDataProvider}"
itemClick="onDataGridItemClick()">
</mx:DataGrid>
<!-- edit mode: show UI components in inline edit mode -->
<flexforforce:FieldContainer
id="_editFieldContainer"
width="100%"
includeIn="edit">
</flexforforce:FieldContainer>
<!-- create mode: show UI components in full edit mode -->
<flexforforce:FieldContainer
id="_createFieldContainer"
startState="Create"
width="100%"
includeIn="create">
</flexforforce:FieldContainer>
17
Step 8: Create the Account Manager User Interface and
Application Logic
Kommentare zu diesen Handbüchern