template::request::is_valid (public)

 template::request::is_valid [ url ]

Defined in packages/acs-templating/tcl/request-procs.tcl

Checks for any param errors. If errors are found, sets the display template to the specified URL (a system-wide request error page by default).

Parameters:
url (optional)
The URL of the template to use to display error messages. The special value "self" may be used to indicate that the template for the requested page itself will handle reporting error conditions.
Returns:
1 if no error conditions exist, 0 otherwise.

Partial Call Graph (max 5 caller/called nodes):
%3 template::request::error template::request::error (public) template::request::is_valid template::request::is_valid template::request::error->template::request::is_valid template::adp_level template::adp_level (public) template::request::is_valid->template::adp_level template::resource_path template::resource_path (public) template::request::is_valid->template::resource_path template::set_file template::set_file (public) template::request::is_valid->template::set_file

Testcases:
No testcase defined.
Source code:
    set level [template::adp_level]
    upvar #$level request:error requesterror

    if { [info exists requesterror] } {

        # set requesterror as a data source
        uplevel #$level "upvar 0 request:error requesterror"

        if { $url ne "self" } {

            if {$url eq {}} {
                set file_stub [template::resource_path -type messages -style request-error]
            } else {
                set file_stub [ns_url2file $url]
            }
            template::set_file $file_stub
        }

        return 0

    } else {

        return 1
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: