
StaticAssets.REPORT_IMAGE_32,
"Account deleted",
status.description
)
);
}
protected function onEditCancel() : void {
_app.setStatus( null );
// clear and go back to empty mode
_editFieldContainer.fieldCollection.clear();
currentState = "default";
}
protected function onCreateSaveClick() : void {
_app.setStatus( null );
// The new account object has been created in memory.
// Now commit the new object to the database.
_createFieldContainer.fieldCollection.updateObject(
new mx.rpc.Responder( commitToDB, saveFaultHandler )
);
}
protected function onCreateCancelClick() : void {
_app.setStatus( null );
// clear and go back to empty mode
_createFieldContainer.fieldCollection.clear();
currentState = "default";
}
protected function saveFaultHandler( msg : F3Message ) : void {
// If there are invalid fields, stay on the edit screen
// so the user has a chance to fix the errors.
// Otherwise, clear the record.
if (
msg != null &&
msg.messageType != F3Message.ERROR_INVALID_FIELDS
) {
currentState = "default";
}
if ( msg != null ) {
var faultEvent : FaultEvent = msg.context as FaultEvent;
if ( faultEvent ) {
LOG.error( faultEvent.fault.faultString );
LOG.error( faultEvent.fault.faultDetail );
LOG.error( faultEvent.fault.faultCode );
}
}
}
28
Step 8: Create the Account Manager User Interface and
Application Logic
Kommentare zu diesen Handbüchern