xowiki::formfield::CompoundField instproc get_named_sub_component_value (public)
<instance of xowiki::formfield::CompoundField> get_named_sub_component_value \ [ -from_repeat ] [ -default default ] args [ args... ]
Defined in /var/www/openacs.org/packages/xowiki/tcl/form-field-procs.tcl
Return the value of a named subcomponent. When the named subcomponent is a repeated item, and the value of the 0th element of the repeat (the template element) is omitted from the returned value.
- Switches:
- -from_repeat (optional)
- skip template element from repeated values
- -default (optional)
- default value, when component is not found
- Parameters:
- args (required)
- space separated path of elements names in a potentially nested component structure (similar to dict)
- Testcases:
- create_test_items
Source code: if {[:exists_named_sub_component {*}$args]} { set result [[:get_named_sub_component {*}$args] value] if {$from_repeat} { if {[lindex [split [lindex $result 0] .] end] eq "0"} { set result [lrange $result 2 end] } } } else { set result $default } return $resultXQL Not present: Generic, PostgreSQL, Oracle