template::element::copy_value_to_values_if_defined (private)

 template::element::copy_value_to_values_if_defined

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

define values from value, if the latter is more defined

Partial Call Graph (max 5 caller/called nodes):
%3 template::element::create template::element::create (public) template::element::copy_value_to_values_if_defined template::element::copy_value_to_values_if_defined template::element::create->template::element::copy_value_to_values_if_defined template::element::set_properties template::element::set_properties (public) template::element::set_properties->template::element::copy_value_to_values_if_defined

Testcases:
No testcase defined.
Source code:
    upvar opts opts
    # opts(values) is always defined, init to "" from template::element::defaults
    if { [info exists opts(value)] && [llength $opts(values)] == 0 } {
        #
        # GN: the following test is broken, since "opts(value)" is never
        # empty; ... but changing this to a comparison with $opts(value)
        # breaks eg ad_form.
        #
        if { [string equal opts(value) {}] } {
            set opts(values) [list]
        } else {
            set opts(values) [list $opts(value)]
        }
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: