Class: UI

$k. UI

new $k.UI()

Provides UI interaction in action scripts

Methods

static$k.UI.alert(message, windowTitle)

Show a notification dialog

Name Type Description
message string
windowTitle string optional

static$k.UI.choose(objects, message, windowTitle, stringFunction) : object

Let the user choose an object from a list

Name Type Description
objects Array.<object>
message string
windowTitle string optional
stringFunction function optional

Function that returns a string that should be displayed for an element

Returns:
Type Description
object Returns undefined if no UI is available

static$k.UI.chooseExpanded(objects) : objects

Let the user choose some objects from a list. Shows details of the objects.

Name Type Description
objects Array.<object>
Returns:
Type Description
objects Returns undefined if no UI is available

static$k.UI.chooseMultiple(objects, message, windowTitle, stringFunction) : objects

Let the user choose some objects from a list.

Name Type Description
objects Array.<object>
message string
windowTitle string optional
stringFunction function optional

Function that returns a string that should be displayed for an element

Returns:
Type Description
objects Returns undefined if no UI is available

static$k.UI.confirm(message, windowTitle) : boolean

Show a confirmation dialog

Name Type Description
message string
windowTitle string optional
Returns:
Type Description
boolean True if confirmed, false if not. Returns undefined if no UI is available.

static$k.UI.hasUI() : boolean

True if UI interaction is possible

Since:
  • 5.2.1
Returns:
Type Description
boolean

static$k.UI.notificationDialog(notificationFunction, parameters, windowTitle)

Open a notification dialog that stays open while the notification function is evaluated

Name Type Description
notificationFunction function

Notification function

parameters Array.<boolean> optional
windowTitle string optional
Since:
  • 4.1.0
See:
  • UIObject#raiseNotification

static$k.UI.openEditor(element, context, options)

Opens an editor on the element

Name Type Description
element $k.SemanticElement
context optional

Context that should be used to detect the view configuration, or a view configuration

options optional

Possible key in option object: #isNew

static$k.UI.openTable(elements, domain, context)

Opens a table on the elements

Name Type Description
elements Array.<$k.SemanticElement>
domain $k.Domain optional

Domain or internal name of a type of the table

context optional

Context that should be used to detect the table configuration, or a table configuration

Since:
  • 4.2.1

static$k.UI.openURL(url)

Opens the URL with the associated application

Name Type Description
url string
Since:
  • 5.2.2

static$k.UI.raiseNotification(jseString)

Raise message notification (to use in function #notificationDialog)

Name Type Description
jseString string
Since:
  • 4.1.0
See:
  • UIObject#notificationDialog

static$k.UI.requestString(message, windowTitle, initialAnswer) : string

Let the user enter a string in a single-line input field

Name Type Description
message string
windowTitle string optional
initialAnswer string optional
Returns:
Type Description
string Returns undefined if no UI is available

alert(message, windowTitle)

Show a notification dialog

Name Type Description
message string
windowTitle string optional

choose(objects, message, windowTitle, stringFunction) : object

Let the user choose an object from a list

Name Type Description
objects Array.<object>
message string
windowTitle string optional
stringFunction function optional

Function that returns a string that should be displayed for an element

Returns:
Type Description
object Returns undefined if no UI is available

chooseExpanded(objects) : objects

Let the user choose some objects from a list. Shows details of the objects.

Name Type Description
objects Array.<object>
Returns:
Type Description
objects Returns undefined if no UI is available

chooseMultiple(objects, message, windowTitle, stringFunction) : objects

Let the user choose some objects from a list.

Name Type Description
objects Array.<object>
message string
windowTitle string optional
stringFunction function optional

Function that returns a string that should be displayed for an element

Returns:
Type Description
objects Returns undefined if no UI is available

confirm(message, windowTitle) : boolean

Show a confirmation dialog

Name Type Description
message string
windowTitle string optional
Returns:
Type Description
boolean True if confirmed, false if not. Returns undefined if no UI is available.

hasUI() : boolean

True if UI interaction is possible

Since:
  • 5.2.1
Returns:
Type Description
boolean

notificationDialog(notificationFunction, parameters, windowTitle)

Open a notification dialog that stays open while the notification function is evaluated

Name Type Description
notificationFunction function

Notification function

parameters Array.<boolean> optional
windowTitle string optional
Since:
  • 4.1.0
See:
  • UIObject#raiseNotification

openEditor(element, context, options)

Opens an editor on the element

Name Type Description
element $k.SemanticElement
context optional

Context that should be used to detect the view configuration, or a view configuration

options optional

Possible key in option object: #isNew

openTable(elements, domain, context)

Opens a table on the elements

Name Type Description
elements Array.<$k.SemanticElement>
domain $k.Domain optional

Domain or internal name of a type of the table

context optional

Context that should be used to detect the table configuration, or a table configuration

Since:
  • 4.2.1

openURL(url)

Opens the URL with the associated application

Name Type Description
url string
Since:
  • 5.2.2

raiseNotification(jseString)

Raise message notification (to use in function #notificationDialog)

Name Type Description
jseString string
Since:
  • 4.1.0
See:
  • UIObject#notificationDialog

requestString(message, windowTitle, initialAnswer) : string

Let the user enter a string in a single-line input field

Name Type Description
message string
windowTitle string optional
initialAnswer string optional
Returns:
Type Description
string Returns undefined if no UI is available