Adds an error message that will be displayed to the user, sourced from an existing text. This method supports the addition
of a message from a configured text and supports multiple languages and the substitution of variables.
Messages are removed automatically by the system once they have been displayed to the user.
Any accessible text can be displayed as a message; this includes local texts defined using the form/component text editor
and linked texts which exist in linked texts files. Within each text, a substitutable variable is identified by &&.
Any substitutable variables in the text are replaced with values in the replaceParameters
parameter (see example below).
When stopProcessing is true, all processing for the current event is stopped immediately and the page
is redisplayed to the user so the error can be corrected. When stopProcessing is false, processing
continues normally, except that the user is prevented from navigating forwards to another page using a
Next Page Button Control or the next page button within a Page Navigation Panel Control. Note that the same
restriction does not apply when navigating to another page using other methods e.g. the WebForm#gotoPage(Page) method.
Set stopProcessing to false when there is a requirement to display multiple error messages on a page.
EventContext#stopExecution() can then be used at a later point to stop processing and display the messages to the user.
Messages can be displayed either locally to the message owner (a control or page) or at another location on the same page
represented by a Message Control. For further information on the location and styling of messages, please see the online
documentation available from the Help menu, search on message options, then follow the link to Message Options For Controls.
If text Txt29 in language EN contains text: Order type && is invalid for customer type &&
this might be displayed as: Order type CREDIT is invalid for customer type PUBLIC
Parameters
Text
text,
UNKNOWNjava.lang.String[]
replaceParameters,
boolean
stopProcessing,
Any accessible text can be displayed as a message; this includes local texts defined using the form/component text editor and linked texts which exist in linked texts files. Within each text, a substitutable variable is identified by &&. Any substitutable variables in the text are replaced with values in the
replaceParameters
parameter (see example below).When
stopProcessing
istrue
, all processing for the current event is stopped immediately and the page is redisplayed to the user so the error can be corrected. WhenstopProcessing
isfalse
, processing continues normally, except that the user is prevented from navigating forwards to another page using a Next Page Button Control or the next page button within a Page Navigation Panel Control. Note that the same restriction does not apply when navigating to another page using other methods e.g. the WebForm#gotoPage(Page) method.Set
stopProcessing
tofalse
when there is a requirement to display multiple error messages on a page. EventContext#stopExecution() can then be used at a later point to stop processing and display the messages to the user.Messages can be displayed either locally to the message owner (a control or page) or at another location on the same page represented by a Message Control. For further information on the location and styling of messages, please see the online documentation available from the Help menu, search on message options, then follow the link to Message Options For Controls.
Javascript example:
If text Txt29 in languageEN
contains text:Order type && is invalid for customer type &&
this might be displayed as:
Order type CREDIT is invalid for customer type PUBLIC