The StateChangedListeners stateChanged method will be called when the state of the trade changes.
StateChangedListener's are added with
module:caplin/trading/trademodel/Trade#addStateChangedListener
and removed with module:caplin/trading/trademodel/Trade#removeStateChangedListener
.Methods
-
stateChanged(oState, sEventName)
-
Called when the state of the trade changes.
Parameters:
Name Type Description oState
module:caplin/trading/statemachine/State The new state that we have just transitioned to. Will not be null or undefined. sEventName
String The name of the transition that was used to enter the new state. If the state has timed out the event will be '__TIMEOUT'. Will not be null or undefined. - Implementations:
- module:caplin/trading/presenter/TradeStateProperty#stateChanged
- module:caplin/trading/workbench/model/StateMachineMonitor#stateChanged