util_get_user_messages (public)

 util_get_user_messages [ -keep ] -multirow multirow

Defined in packages/acs-tcl/tcl/utilities-procs.tcl

Gets and clears the message to be displayed on the next page load.

Switches:
-keep (optional, boolean)
If set, then we will not clear the list of messages after getting them. Normal behavior is to clear them, so we only display the same messages once.
-multirow (required)
Name of a multirow in the current template namespace where you want the user messages set. The multirow will have one column, which is 'message'.
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_util_user_messages util_user_messages (test acs-tcl) util_get_user_messages util_get_user_messages test_util_user_messages->util_get_user_messages ad_get_client_property ad_get_client_property (public) util_get_user_messages->ad_get_client_property ad_set_client_property ad_set_client_property (public) util_get_user_messages->ad_set_client_property template::multirow template::multirow (public) util_get_user_messages->template::multirow packages/acs-subsite/www/admin/plain-master.tcl packages/acs-subsite/ www/admin/plain-master.tcl packages/acs-subsite/www/admin/plain-master.tcl->util_get_user_messages packages/acs-subsite/www/group-master.tcl packages/acs-subsite/ www/group-master.tcl packages/acs-subsite/www/group-master.tcl->util_get_user_messages packages/acs-subsite/www/plain-master.tcl packages/acs-subsite/ www/plain-master.tcl packages/acs-subsite/www/plain-master.tcl->util_get_user_messages packages/acs-subsite/www/shared/plain-master.tcl packages/acs-subsite/ www/shared/plain-master.tcl packages/acs-subsite/www/shared/plain-master.tcl->util_get_user_messages packages/openacs-default-theme/lib/plain-master.tcl packages/openacs-default-theme/ lib/plain-master.tcl packages/openacs-default-theme/lib/plain-master.tcl->util_get_user_messages

Testcases:
util_user_messages
Source code:
    set messages [ad_get_client_property -default {} -cache_only t "acs-kernel" "general_messages"]

    #
    # If there is a hint on the current page, that we do not want the
    # content to be consumed (e.g. a redirect) the force keep_p.
    #
    if {[info exists ::__skip_util_get_user_messages]} {
        set keep_p 1
    }
    if { !$keep_p && $messages ne "" } {
        ad_set_client_property -persistent f "acs-kernel" "general_messages" {}
    }
    template::multirow create $multirow message severity
    foreach {message count} $messages {
        lassign $message message severity
        if {$count > 1} {
            append message " ($count)"
        }
        template::multirow append $multirow $message $severity
    }
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/utilities-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: