lundi 25 mai 2015

How to activate the background button again after clicking cancel?

Consider the following code:

// Pause Button related code start
public function pauseTest( extReference:String,testID:String):void
{
    DetailsPanelView(view).pauseButton.enabled = false;
    var exeCompDO:PauseTestDO = new PauseTestDO(extReference,testID,"");
    if (exeCompDO != null)
    {
        send(new PauseCommentCue(exeCompDO));
    }
}

[CommandResult]
public function onPauseTestResult(result:ResultEvent, trigger:PauseTestTrigger):void
{
    //DetailsPanelView(view).pauseButton.enabled = true;
}

[CommandError]
public function onPauseTestError(error:FaultEvent, trigger:PauseTestTrigger):void
{
    //DetailsPanelView(view).pauseButton.enabled = true;
    TestUtility.showFaultEventReason(error,this);

}

When clicking on pause, a workflow pops up and allows me to add some comment. When I save it, the workflow closes and changes the status to paused.

But when I click the pause button and click anywhere on the screen or cancel the workflow, it saves to the draft but the background pause button still remains disable. After I click my selection again then the button enables. I want it to enable right after I cancel the workflow. How can I do that?

Aucun commentaire:

Enregistrer un commentaire