
StaticAssets—A Force.com Flex component used to retrieve assets such as the account image to be presented in the
UIs.
•
•
ToasterEvent—A Force.com Flex event class used to raise a Force.com Flex toaster alert.
•
F3DesktopApplication—A Force.com Flex application container.
•
F3DesktopWrapper—A Force.com Flex component that wraps the functionality of Adobe's Data Management Service
(DMS), a key component of Adobe AIR platform that provides a model to manage client-server data synchronization.
•
F3Message—A Force.com Flex component that provides standard contextual error and information messages, such as data
conflicts.
•
Toaster—A Force.com Flex component that displays a popup containing a message.
•
ArrayCollection—An ActionScript wrapper containing an array representation of a collection. It will be used to create
the variable containing the Account records.
•
IManaged—An ActionScript interface that provides the contract for a managed object. It will be used to commit information
to the database.
•
ILogger and Log—An ActionScript interface and class used for logging error messages.
•
Responder—An ActionScript class containing methods called by a remote service. It is used to create objects sent with
requests to either the local database or the Salesforce database.
•
FaultEvent—An ActionScript class used when handling errors. It is used to handle errors when the user attempts to save
accounts containing invalid fields.
•
Account—The ActionScript class representing the Account object generated by Force.com Flex.
The code looks like this:
import com.salesforce.assets.StaticAssets;
import com.salesforce.events.ToasterEvent;
import com.salesforce.flexforforce.F3DesktopApplication;
import com.salesforce.flexforforce.F3DesktopWrapper;
import com.salesforce.notifications.F3Message;
import com.salesforce.notifications.Toaster;
import mx.collections.ArrayCollection;
import mx.data.IManaged;
import mx.logging.ILogger;
import mx.logging.Log;
import mx.rpc.Responder;
import mx.rpc.events.FaultEvent;
import services.flexforforce.Account;
12. Create variables that your code can use to access the application container, database functionality, and error logging:
private static const LOG : ILogger = Log.getLogger( "AccountsView" );
protected var _app : F3DesktopApplication;
protected var _desktopWrapper : F3DesktopWrapper;
13. Create a variable that your code can use to display the account data retrieved in the query.
// After executing a query, this is populated with the resulting rows
[Bindable]
protected var _gridDataProvider : ArrayCollection = new ArrayCollection();
20
Step 8: Create the Account Manager User Interface and
Application Logic
Kommentare zu diesen Handbüchern