util_user_message (public)
util_user_message [ -replace ] [ -html ] [ -message message ] \ [ -severity severity ]
Defined in packages/acs-tcl/tcl/utilities-procs.tcl
Sets a message to be displayed on the next page request.
- Switches:
- -replace (optional, boolean)
- Set this if you want to replace existing messages. Default behavior is to append to a list of messages.
- -html (optional, boolean)
- Set this flag if your message contains HTML. If specified, you're responsible for proper quoting of everything in your message. Otherwise, we quote it for you.
- -message (optional)
- The message to display.
- -severity (optional, defaults to
"success"
)- an indication of the message severity, that the page template may use to e.g. color-code the message for the user. Must be one of "success", "info", "warning" or "danger".
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- util_user_messages
Source code: if {$severity ni {"success" "info" "warning" "danger"}} { error {Invalid severity. Must be one of "success", "info", "warning" or "danger"} } if {$replace_p} { set messages [list] } else { set messages [ad_get_client_property -default {} -cache_only t "acs-kernel" "general_messages"] } if { $message ne "" } { if { !$html_p } { set message [ns_quotehtml $message] } dict incr messages [list $message $severity] } ad_set_client_property -persistent f "acs-kernel" "general_messages" $messagesXQL Not present: PostgreSQL, Oracle Generic XQL file: packages/acs-tcl/tcl/utilities-procs.xql