template::wizard::create (public)

 template::wizard::create [ args... ]

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

example:
    template::wizard create -action "wizard" -name my_wizard -params {
        my_param1 my_param2
    } -steps {
        1 -label "Step 1" -url "step1"
        2 -label "Step 2" -url "step2"
        3 -label "Step 3" -url "step3"
    }
    
  • action - the url where the wizard will always submit, normally is the same as your current wizard file. Has no effect for subwizards.
  • name - use to distinguish between the different wizards, since you can have 1 or more subwizard. "name" must be a bare Tcl word (no spaces etc.)
  • params - are used to keep values that you would like to pass on to the other steps
  • steps - are used to define what includes to use for each step of the wizard

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 template::adp_level template::adp_level (public) template::util::get_opts template::util::get_opts (public) template::wizard::add template::wizard::add (private) template::wizard::get_wizards template::wizard::get_wizards (private) template::wizard::create template::wizard::create template::wizard::create->template::adp_level template::wizard::create->template::util::get_opts template::wizard::create->template::wizard::add template::wizard::create->template::wizard::get_wizards

Testcases:
No testcase defined.
Source code:

    set level [template::adp_level]

    variable parse_level
    set parse_level $level

    # keep wizard properties and a list of the steps
    upvar #$level wizard:steps steps wizard:properties opts
    upvar #$level wizard:rowcount rowcount
    upvar #$level wizard:columns columns
    upvar #$level wizard:name wizard_name
    upvar #$level wizard:wizards wizards

    template::util::get_opts $args

    set steps [list]
    set rowcount 0
    if { [info exists opts(name)] } {
        set wizard_name $opts(name)
    } else {
        set wizard_name "wizard${level}"
    }
    set wizards [get_wizards]

    set columns [list label rownum id link url]

    # let's add the visited step param
    lappend opts(params) wizard_visitedstep${wizard_name}

    # add steps specified at the time the wizard is created
    if { [info exists opts(steps)] } {

        # strip carriage returns
        regsub -all -- {\r} $opts(steps) {} step_data

        foreach step [split $step_data "\n"] {

            set step [string trim $step]
            if {$step eq {}} { continue }

            add {*}$step
        }
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: