template::wizard::get_forward_url (public)

 template::wizard::get_forward_url step_id

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

Build the redirect URL for the next step

Parameters:
step_id (required)
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 template::wizard::add template::wizard::add (private) template::wizard::get_forward_url template::wizard::get_forward_url template::wizard::add->template::wizard::get_forward_url template::wizard::forward template::wizard::forward (public) template::wizard::forward->template::wizard::get_forward_url template::wizard::get_current_step template::wizard::get_current_step (public) template::wizard::get_current_step->template::wizard::get_forward_url template::adp_level template::adp_level (public) template::wizard::get_forward_url->template::adp_level template::wizard::get_reference template::wizard::get_reference (private) template::wizard::get_forward_url->template::wizard::get_reference

Testcases:
No testcase defined.
Source code:

    variable parse_level
    get_reference

    set level [template::adp_level]

    upvar #$level wizard:params params

    set url [ns_conn url]?wizard_step${wizard_name}=$step_id&wizard_name=$wizard_name

    # create the wizards and keep track of their steps too
    foreach one_wizard $wizards {
        append url "&wizard_step${one_wizard}=[ns_queryget wizard_step${one_wizard}]"
        append url "&wizard_visitedstep${one_wizard}=[ns_queryget wizard_visitedstep${one_wizard}]"
    }

    set multiple_listed [list]

    # check for passthrough parameters

    if { [info exists properties(params)] } {
        foreach param $properties(params) {
            upvar #$level $param value
            set flags [split [lindex [split $param ":"] 1] ","]
            if { [lsearch -exact [split [lindex [split $param ":"] 1] ",""array"] != -1 || [array exists value] } {
                # Array
                foreach {index array_value} [array get value] {
                    if { [info exists array_value] && $array_value ne "" } {
                        append url "&$param.$index=[ns_urlencode $array_value]"
                    } else {
                        append url "&$param.$index="
                    }
                }
            } else {
                # Normal Variable
                if { [lsearch -exact [split [lindex [split $param ":"] 1] ",""multiple"] != -1 } {
                    # Multiple
                    set param [lindex [split $param ":"] 0]
                    if {$param ni $multiple_listed} {
                        foreach check_param $properties(params) {
                            if { [lindex [split $check_param ":"] 0] eq $param } {
                                set value_list [ns_querygetall $param]
                                for { set i 0 } { $i < [llength $value_list] } { incr i } {
                                    append url "&$param=[ns_urlencode [lindex $value_list $i]]"
                                }
                            }
                        }
                        lappend multiple_listed $param
                    }
                } else {
                    # Normal Var
                    if { [info exists params($param)] } {
                        append url "&$param=[ns_urlencode $params($param)]"
                    } else {
                        append url "&$param=[ns_urlencode [ns_queryget $param]]"
                    }
                }
            }
        }
    }

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