template::widget::select_text (public)
template::widget::select_text element_reference tag_attributes
Defined in packages/acs-templating/tcl/widget-procs.tcl
Implements the complex widget select_text which combines a select widget with a text widget
- Parameters:
- element_reference (required)
- tag_attributes (required)
- Returns:
- Error:
- Author:
- Dave Bauer <dave@thedesignexperience.org>
- Created:
- 2004-07-18
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: upvar $element_reference element array set attributes [::template::widget::merge_tag_attributes element $tag_attributes] if { [info exists element(value)] } { set select [template::util::select_text::get_property select_value $element(value)] set text [template::util::select_text::get_property text_value $element(value)] } else { set select {} set text {} } set output {} if {$element(mode) eq "edit"} { # edit mode set element(value) $select append output [template::widget::menu $element(name) $element(options) $select attributes $element(mode)] if {![info exists element(other_label)]} { set element(other_label) "[_ acs-templating.Other]" } append output " $element(other_label): " set element(value) $text set element(name) $element(name)\.text append output [template::widget::input text element $tag_attributes] } else { # display mode if { [info exists element(value)] } { append output [template::util::select_text::get_property select_value $element(value)] " " [template::util::select_text::get_property text_value $element(value)] [subst {<input type="hidden" name="$element(id).text" value="[ns_quotehtml $text]">}] [subst {<input type="hidden" name="$element(id)" value="[ns_quotehtml $select]">}] } } return $outputXQL Not present: PostgreSQL, Oracle Generic XQL file: packages/acs-templating/tcl/widget-procs.xql