Difference between revisions of "ShowMessage"

From LongJump Support Wiki
imported>Aeric
imported>Aeric
 
Line 24: Line 24:
</syntaxhighlight>
</syntaxhighlight>


If no arguments are needed, use:
If no arguments are needed (for example, for a label in the <tt>#custom</tt> category), use:
:<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
Functions.showMessage("#custom.label",null)
Functions.showMessage("#custom.label",null)

Latest revision as of 19:28, 12 July 2011

Functions.showMessage(String key [, String[] args])
Description
  • Displays the message in the UI, irrespective of any database insertions or updates (without interrupting the program flow) via the Java API
  • Translates the token and displays the Custom Label in the selected language
Element Display Type Description
key string

Created from category name, followed by '.' and token name

Syntax
#categoryname.tokenname
args string Optional

Declares an array of Strings in Java (or Arguments)

  • If arguments are passed, the call expects a token
  • If no arguments are passed, the message alone is displayed
Syntax
void Functions.showMessage(String key [, String[] args]);

If no arguments are needed (for example, for a label in the #custom category), use:

Functions.showMessage("#custom.label",null)
Return
  • Returns the localized message configured on the key in the Translation Workbench
  • If no key is configured in the translation workbench, then the passed key is returned