actionCall method

void actionCall (
  1. Object action,
  2. [Map actMap]
)

Entry point for standard Form Widget actions such as a button press.

It asserts there is an entry in the related SamAction map for the action.

For non-samcas standard actions the SamState definition must allow them to occur or ignore them (in which case they will be quietly discarded).

If the action is valid and to be processed it presents the action as a proposal to SamModel.present along with any related parameters sent by the action requester.

Implementation

void actionCall(Object action,[Map actMap]) {
  if (_bDebLog) log("action call $this $action actMap=${actMap != null} ");
  assert(
  ((_enumTypes.firstWhere((_) => (action.runtimeType == _),orElse:(() => null))) != null) ||
      (action.runtimeType == SE.sa_change.runtimeType),
  "action $action not allowable type ${action.runtimeType}"
  );
  String fnStr = "$action";
  if (this._sa.fnMap.containsKey(fnStr)) {
    if (actMap == null) {
      this.present(this._samState, action);
    } else {
      this.present(this._samState,action,stepParms:{'actMap':actMap});
    }
  } else {
    if (_bDebLog) log("No action for $action in $this");
  }
}