MACROMEDIA FLEX BUILDER-USING FLEX BUILDER Instrukcja Użytkownika Strona 33

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 39
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 32
protected function commitToDB( managedObject : IManaged ) : void {
_desktopWrapper.save(
managedObject ) // After saving, go to edit mode
and render the saved object.
currentState = "edit";
_editFieldContainer.fieldCollection.render( managedObject
);
// Show the status message
_app.setStatus(
new F3Message(
F3Message.STATUS_INFO,
"Account saved"
)
);
},
protected function onDataGridItemClick() : void {
_app.setStatus( null );
var account : Account = _dataGrid.selectedItem as Account;
if ( account == null ) {
// nothing selected -> go back to default state
currentState = "default";
}
else {
// Go to edit mode and render the selected account
currentState = "edit";
_editFieldContainer.fieldCollection.render( account );
var status : F3Message = new F3Message(
F3Message.STATUS_INFO,
"Account with id: " +
account.Id +
", name: " +
account.Name +
" selected"
);
// Show the message in the status bar
_app.setStatus( status );
// Show the toaster
_app.showToaster(
new Toaster(
StaticAssets.ACCOUNT_IMAGE_32,
"Account Selected",
status.description,
account.Name,
onToasterSelected
)
);
}
29
Step 8: Create the Account Manager User Interface and
Application Logic
Przeglądanie stron 32
1 2 ... 28 29 30 31 32 33 34 35 36 37 38 39

Komentarze do niniejszej Instrukcji

Brak uwag