$k. Action

new Action()

Action on a view

Methods

(static) current()

Returns the current action if set, undefined if not.

actionType() → {string}

Returns the type of the action (configured or built-in)

Since
  • 5.2.2
Returns:
Type: 
string

addressedElement() → {$k.SemanticElement}

get the addressed element of the action - usually the same as: receiver().semanticElement()

Since
  • 5.4.0
Returns:
Type: 
$k.SemanticElement

addressedModel()

Get the addressed model of the action - usually the same as: receiver().model(), but different e.g. in case of menu actions on table rows

Since
  • 5.4.0

addValidationError(errorMessage)

Add a validation error message

Only supported in the following application environment(s): View-Configuration-Mapper

Parameters:
NameTypeDescription
errorMessagestring
Since
  • 5.4.0
Deprecated
  • This function is deprecated and might be removed in future releases

configurationElement() → {$k.SemanticElement}

Get configuration element

Since
  • 5.2.2
Returns:
Type: 
$k.SemanticElement

dropMarkedAction()

Discard a marked action without execution

Only supported in the following application environment(s): View-Configuration-Mapper

Since
  • 5.4.0

getPanelsToActivate() → {Array.<$dom.Element>}

get the panel configurations activated by the action

Only supported in the following application environment(s): View-Configuration-Mapper

Since
  • 5.4.0
Returns:
Type: 
Array.<$dom.Element>

getParameter(parameter)

Get the value of the given parameter

Parameters:
NameTypeDescription
parameterstring

getVariable(variable)

get the value of the given variable

Parameters:
NameTypeDescription
variablestring
Returns:

(arrays of) SemanticElements and timestamps are auto-converted to native form

hasValidationErrors() → {boolean}

Returns true if the action has validation errors

Since
  • 5.3.2
Returns:
Type: 
boolean

isFailed() → {boolean}

Returns true if the action is marked as failed

Only supported in the following application environment(s): View-Configuration-Mapper

Since
  • 5.3.2
Returns:
Type: 
boolean

recallingAction()

The action recalling this action

Only supported in the following application environment(s): View-Configuration-Mapper

Since
  • 5.4.0

recallMarkedAction()

Activate the recall action marked previously

Only supported in the following application environment(s): View-Configuration-Mapper

Since
  • 5.4.0

receiver() → {$k.View}

Get the receiver view of the action

Since
  • 5.2.0
Returns:
Type: 
$k.View

result() → {$k.ActionResult}

Get the action result of the action

Since
  • 5.4.0
Returns:
Type: 
$k.ActionResult

selectedElement() → {$k.SemanticElement}

Get the selected element of the action - if present

Returns:
Type: 
$k.SemanticElement

session() → {$k.Session}

Get the session of the action

Returns:
Type: 
$k.Session

setClosePanel(closePanel)

Specify if the panel shall be closed after the action. Overrides action configuration.

Only supported in the following application environment(s): View-Configuration-Mapper

Parameters:
NameTypeDescription
closePanelboolean

setFailed(failMessage)

Mark the action as failed. The transaction will be aborted and a failure response will be generated.

Only supported in the following application environment(s): View-Configuration-Mapper

Parameters:
NameTypeDescription
failMessagestring

setNotification(jseMessageString, jseTypeStringopt) → {$k.ActionResponse}

Notification function

Only supported in the following application environment(s): View-Configuration-Mapper

Parameters:
NameTypeAttributesDescription
jseMessageStringstring
jseTypeStringstring<optional>
Returns:
Type: 
$k.ActionResponse

setTransactionCommit(transactionCommit)

Specify if the long running transaction shall be committed after the action. Overrides action configuration.

Only supported in the following application environment(s): View-Configuration-Mapper

Parameters:
NameTypeDescription
transactionCommitboolean

setVariable(variable, value)

set the value of the given variable

Parameters:
NameTypeDescription
variablestring
value

supported variable types include all javascript base types as well as: timestamp, SemanticElement and arrays of the latter