Retrieve a message from the collaboration message file.
Syntax
public String getMessage(int messageNum) public String getMessage(int messageNum, Object[] paramArray)
Parameters
Return values
A String object that contains the message text for the message identified by messageNum.
Notes
The getMessage() method provides two forms:
For more information on message files and message parameters, see Creating a message file.
Examples
Suppose your collaboration message file defines the following two messages with message numbers of 8 and 9:
8 Error occurred during JDBC URL conversion. Reason:{1} [EXPL] An error, indicated by the reason, occurred during the conversion of a JDBC URL string. 9 Invalid login encountered in command-line arguments. A valid login must contain a login name and a password. [EXPL] A password has been specified but a user name has not. If no login name is specified, the default login name "crossworlds" is assumed.
The following call to getMessage() obtains the text associated with message 9:
String invalidLogin = getMessage(9);
The following call to getMessage() obtains the text associated with message 8 and includes a value for the message's Reason parameter:
String reason = "Invalid database table."; Object[] paramList = new Object[1]; paramList[0] = reason; badConversion = getMessage(8, paramList);
The message obtained from the previous getMessage() call would be:
Error occurred during JDBC URL conversion. Reason:Invalid database table.