template::list::element::set_property (public)

 template::list::element::set_property -list_name list_name \
    -element_name element_name -property property -value value \
    [ -ulevel ulevel ]

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

Set a property in the named list template.

Switches:
-list_name (required)
-element_name (required)
-property (required)
-value (required)
-ulevel (optional, defaults to "1")

Partial Call Graph (max 5 caller/called nodes):
%3 packages/bookmarks/www/search.tcl packages/bookmarks/ www/search.tcl template::list::element::set_property template::list::element::set_property packages/bookmarks/www/search.tcl->template::list::element::set_property template::list::element::set_properties template::list::element::set_properties (public) template::list::element::set_properties->template::list::element::set_property template::list::set_elements_property template::list::set_elements_property (public) template::list::set_elements_property->template::list::element::set_property template::list::element::get_reference template::list::element::get_reference (public) template::list::element::set_property->template::list::element::get_reference template::list::get_reference template::list::get_reference (public) template::list::element::set_property->template::list::get_reference template::list::util_html_to_attributes_string template::list::util_html_to_attributes_string (public) template::list::element::set_property->template::list::util_html_to_attributes_string

Testcases:
No testcase defined.
Source code:
    # Get an upvar'd reference to list_properties
    template::list::get_reference -name $list_name

    get_reference  -list_name $list_name  -element_name $element_name

    switch -- $property {
        display_eval - link_url_eval {
            # This is a chunk of Tcl code, which should be executed later, not now
            set element_properties($property$value

            # Remember that we'll have to do dynamic columns
            set list_properties(dynamic_cols_p) 1
        }
        aggregate {
            # Remember that we'll have to do aggregation
            set list_properties(aggregates_p) 1

            # do an uplevel subst on the value now
            set element_properties($property) [uplevel $ulevel [list subst $value]]
        }
        html {
            # All other vars, do an uplevel subst on the value now
            set element_properties($property) [uplevel $ulevel [list subst $value]]
            set element_properties(cell_attributes)  [template::list::util_html_to_attributes_string $element_properties(html)]
        }
        default {
            # We require all properties to be initialized to the empty
            # string in the array, otherwise they're illegal.
            if { ![info exists element_properties($property)] } {
                error "Unknown element property '$property' for element '$element_name' in list '$list_name'. Allowed properties are [join [array names element_properties] ""]."
            }

            # All other vars, do an uplevel subst on the value now
            set element_properties($property) [uplevel $ulevel [list subst $value]]
        }
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: