Flash - Http service bound to a button can be used only once ?

Posted by SAKIROGLU Koray on Stack Overflow See other posts from Stack Overflow or by SAKIROGLU Koray
Published on 2010-06-10T12:38:46Z Indexed on 2010/06/10 12:43 UTC
Read the original article Hit count: 258

Filed under:
|
|

I have a flex project, in one of the screen of my UI, I create a HTTP service that call a "doGet" J2EE servlet through the GET method; and I bind the service call to a button.

The service print log to system.out so I know when it is run.

The problem I have is, when I click said button the first time, the servlets do what it is supposed to do, and print the stack to system.out, but if I click another time, nothing happens. Any idea what might be the cause ?

Here's the flex code (code and service has been generated by Eclipse flex plugin)

<mx:Script>
    <![CDATA[
protected function button_clickHandler(event:MouseEvent):void
        {
            LaunchSimulResult.token = simulation.LaunchSimul();
        }       
    ]]>
</mx:Script>
<mx:Canvas>
...
<mx:Button label="Simulation" id="button" click="button_clickHandler(event)"/>
..
</mx:Canvas>
<mx:CallResponder id="LaunchSimulResult"/>
<simulation:Simulation id="simulation" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>

© Stack Overflow or respective owner

Related posts about flash

Related posts about servlets