AgileApps Support Wiki Pre Release

Difference between revisions of "Functions.showMessage"

From AgileApps Support Wiki
imported>Aeric
m (Text replace - 'showMessage(' to 'Functions.showMessage(')
 
imported>Aeric
Line 20: Line 20:


;Syntax:
;Syntax:
void Functions.showMessage(String key [, String[] args]);
:<syntaxhighlight lang="java" enclose="div">
void Functions.showMessage(String key [, String[] args]);
</syntaxhighlight>


If no arguments are needed, use:
If no arguments are needed, use:
 
:<syntaxhighlight lang="java" enclose="div">
Functions.showMessage("#custom.label",null)
Functions.showMessage("#custom.label",null)
</syntaxhighlight>


;Return:
;Return:

Revision as of 19:26, 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

A category name, followed by '.' and a message or label identifier (a "token").
Example: #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
<syntaxhighlight lang="java" enclose="div">

void Functions.showMessage(String key [, String[] args]); </syntaxhighlight>

If no arguments are needed, use:

<syntaxhighlight lang="java" enclose="div">

Functions.showMessage("#custom.label",null) </syntaxhighlight>

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