Class: Action

$k. Action

new $k.Action()

Action on a view

Methods

static$k.Action.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 Description
string

addressedElement() : $k.SemanticElement

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

Since:
  • 5.4.0
Returns:
Type Description
$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

Name Type Description
errorMessage string
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 Description
    $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.<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 Description
    Array.<Element>

    getParameter(parameter)

    Get the value of the given parameter

    Name Type Description
    parameter string

    getVariable(variable)

    get the value of the given variable

    Name Type Description
    variable string
    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 Description
    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 Description
    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 Description
    $k.View

    result() : $k.ActionResult

    Get the action result of the action

    Since:
    • 5.4.0
    Returns:
    Type Description
    $k.ActionResult

    selectedElement() : $k.SemanticElement

    Get the selected element of the action - if present

    Returns:
    Type Description
    $k.SemanticElement

    session() : $k.Session

    Get the session of the action

    Returns:
    Type Description
    $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

    Name Type Description
    closePanel boolean

    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

    Name Type Description
    failMessage string

    setNotification(jseMessageString, jseTypeString) : $k.ActionResponse

    Notification function

    Only supported in the following application environment(s): View configuration mapper

    Name Type Description
    jseMessageString string
    jseTypeString string optional
    Returns:
    Type Description
    $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

    Name Type Description
    transactionCommit boolean

    setVariable(variable, value)

    set the value of the given variable

    Name Type Description
    variable string
    value

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