<mx:Text width="100%" styleName="failText" text="{failureText}"/>
</mx:VBox>
+ <mx:VBox width="100%" height="100%" id="dataTab">
+ <mx:TextArea width="100%" height="100%" id="dataText"/>
+ </mx:VBox>
+
</mx:ViewStack>
<mx:ControlBar>
+ <mx:Button id="dataButton" label="View data" visible="false" click="processSequence.selectedChild=dataTab" styleName="titleWindowButton" />
<mx:Spacer width="100%"/>
<mx:Button id="cancelButton" label="Cancel" click="close();" styleName="titleWindowButton" />
<mx:Button id="saveButton" label="Save >" click="startSave();" styleName="titleWindowButton" />
saveProgress.label = "Uploading changes";
_connection.addEventListener(Connection.SAVE_COMPLETED, saveCompleted);
- _connection.uploadChanges();
+ var rawData:*=_connection.uploadChanges();
+ if (rawData) {
+ dataText.text=rawData.toString();
+ dataButton.visible=true;
+ }
}
private function changesetError(event:Event):void {
private function saveCompleted(event:SaveCompleteEvent):void {
if ( event.saveOK ) {
_connection.dispatchEvent(new AttentionEvent(AttentionEvent.ALERT, null, "Changes successfully saved"));
- close();
+ if (processSequence.selectedChild!=dataTab) close();
} else {
fail("Failure when uploading data");
}
processSequence.selectedChild = failureTab;
failureText = text;
}
-
+
private function close():void {
_connection.removeEventListener(Connection.NEW_CHANGESET, changesetCreated);
_connection.removeEventListener(Connection.NEW_CHANGESET_ERROR, changesetError);