ad_custom_page_defaults

one of the documented procedures in this installation of the ACS
Usage:
ad_custom_page_defaults   defaults
What it does:
set the page defaults. If the form is empty do a returnredirect with the defaults set
Defined in: /web/philip/packages/acs-core/table-display-procs.tcl

Source code:


    set form [ns_getform]
    if {[empty_string_p $form] 
        && ![empty_string_p $defaults]} { 
        # we did not get a form so set all the variables 
        # and redirect to set them
        set redirect "[ns_conn url]?"
        set pre {}
        foreach kvp $defaults { 
            append redirect "$pre[lindex $kvp 0]=[ns_urlencode [lindex $kvp 1]]"
            set pre {&}
        }
        ad_returnredirect $redirect
	ad_script_abort
    }
    
    # we have a form so stuff in the ones we dont find.
    # should think about how to support lists and ns_set persist too.
    foreach kvp $defaults { 
        if {[ns_set find $form [lindex $kvp 0]] < 0} { 
            ns_set put $form [lindex $kvp 0] [lindex $kvp 1]
        }
    }


philg@mit.edu