You set up a Rich UI properties library (stereotype RUIPropertiesLibrary) if you wish to retrieve displayable text from external files rather than hard-coding the text in your Rich UI application. The overall mechanism is described in Use of properties files for displayable text. You can also use an implicit function in a Rich UI properties library to substitute values in any string.
Library myLibrary type RUIPropertiesLibrary {propertiesFile="myFile")
entryForInputRequired STRING;
entryForOthers STRING;
someText STRING;
end
Any value assigned directly in a declaration (for example, someText String = "Click!";) has no effect. Every runtime value comes from an external file, with one exception: if the file does not include a particular entry (for example, if the file does not include an entry for someText), the value at run time is the string equivalent of the variable name (for example, "someText").
The default value for propertiesFile is the name of the library; in this case, "myLibrary".
someText=Promote {0} in the {1} department
employeeName, departmentName String;
employeeName = "Jeff";
departmentName = "Sales";
myLabel TextLabel {text =
myLibrary.getMessage(myLibrary.someText, [employeeName, departmentName]);
myMessage STRING = "Promote {0} in the {1} department";
myLabel TextLabel {text =
myLibrary.getMessage(myMessage, [employeeName, departmentName]);
getMessage(baseMessage STRING in, inserts STRING[] in) returns (fullMessage STRING);
employeeName STRING = "Jeff";
myMessage STRING = "Promote {0} in the {1} department";
myLabel TextLabel {text =
myLibrary.getMessage(myMessage, [employeeName]);
You cannot use the function getMessage when overriding a validation or formatting message. You cannot pass inserts to such a message.