Try OpenEdge Now
skip to main content
Developing WebSpeed Applications
WebSpeed API Reference : queue-message
 

queue-message

This function queues a message for later output by either the output-messages or get-message functions. A message group is user-defined and can be used by different parts of an application to queue related messages together.

Location

web\method\message.i

Parameters

INPUT p_grp AS CHARACTER
The message group into which messages will be queued.
INPUT p_message AS CHARACTER
The message text.

Returns

INTEGER

Notes

*The message text may contain HTML tags. However, if the message text might have characters that could be incorrectly interpreted as HTML tags, use the html-encode function to ensure such characters are encoded so this does not happen.
*All queued messages are output after the Web object specified in a URL returns. As such, messages do not remain queued between requests.

Examples

\* Queue up two messages in the "validate" group *\
queue-message("validate", html-encode("invalid zipcode <" + zip-code + "> was
entered")).
queue-message("validate", "City name " + html-encode(customer.city) + " is
unknown").
. . .
\* Output all messages in the validate group with a heading *\
output-messages("group", "validate", "Validation Errors").
. . .
\* Output any remaining messages that are queued *\
output-messages("all", ?, "Other Messages").

See also

available-messages
get-message-groups
queue-message
output-messages