template::element::set_properties (public)

 template::element::set_properties form_id element_id [ args... ]

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

Modify properties of an existing element. The same options may be used as with the create command. Most commonly used to set the default value for an element when a form page is initially requested.

Parameters:
form_id (required)
The identifier of the form containing the element.
element_id (required)
The unique identifier of the element.
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 template::data::transform::spellcheck template::data::transform::spellcheck (public) template::element::set_properties template::element::set_properties template::data::transform::spellcheck->template::element::set_properties ad_sign ad_sign (public) template::element::set_properties->ad_sign template::element::copy_value_to_values_if_defined template::element::copy_value_to_values_if_defined (private) template::element::set_properties->template::element::copy_value_to_values_if_defined template::element::create template::element::create (public) template::element::set_properties->template::element::create template::element::exists template::element::exists (public) template::element::set_properties->template::element::exists template::element::get_reference template::element::get_reference (private) template::element::set_properties->template::element::get_reference

Testcases:
No testcase defined.
Source code:
    get_reference

    # create a reference to opts as expected by get_opts
    upvar 0 element opts

    template::util::get_opts $args

    if { $opts(widget) eq "hidden"
         && [info exists opts(sign)]
         && $opts(sign)
         && [info exists opts(value)] } {
        if { [template::element::exists $form_id $element_id:sig] } {
            template::element::set_properties $form_id $element_id:sig  -value [ad_sign $opts(value)]

        } else {
            template::element::create $form_id $element_id:sig  -datatype text  -widget hidden  -value [ad_sign $opts(value)]
        }
    }

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