template::wizard::forward (public)

 template::wizard::forward

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

call when a step has been validated and completed. checks which submit button was pressed and proceeds accordingly.

See Also:

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

Testcases:
No testcase defined.
Source code:
    set cache_p "f"
    set persistent_p "f"
    set excluded_vars ""

    get_reference

    upvar #$level wizard:current_id current_id
    set current_index [expr {[lsearch -exact $steps $current_id] + 1}]

    if { [ns_queryexists wizard_submit_next] } {

        # figure out the next step and go there

        set next_id [lindex $steps $current_index]
        template::forward [get_forward_url $next_id$cache_p $persistent_p $excluded_vars

    } elseif { [ns_queryexists wizard_submit_back] } {

        set last_id [lindex $steps $current_index-2]
        template::forward [get_forward_url $last_id$cache_p $persistent_p $excluded_vars

    } elseif { [ns_queryexists wizard_submit_repeat] } {

        template::forward "[get_forward_url $current_id]&wizard_submit_repeat=t" $cache_p $persistent_p $excluded_vars

    } elseif { [ns_queryexists wizard_submit_finish] } {

        #    template::forward $properties(action)
        # NOTE : we are changing the behavior of wizard, when its finish it will not reset and go back
        # to step 1, it will blindly go forward and we will catch this on get_current_step
        set next_id [expr {$current_index + 1}]
        template::forward [get_forward_url $next_id$cache_p $persistent_p $excluded_vars
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: