template::widget::textarea_internal (private)

 template::widget::textarea_internal name attribute_reference [ value ] \
    [ mode ] [ tag ]

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

Do the actual construction of a textarea widget, called by various user-callable widgets.

Parameters:
name (required)
Name of the widget.
attribute_reference (required)
Reference variable to the tag_attributes passed to the calling widget proc.
value (optional)
Optional value
mode (optional, defaults to "edit")
If edit, output the textarea HTML, otherwise pass along the value (if it exists) in a hidden HTML input tag
tag (optional, defaults to "textarea")
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::richtext template::widget::richtext (public) template::widget::textarea_internal template::widget::textarea_internal template::widget::richtext->template::widget::textarea_internal template::widget::richtext_or_file template::widget::richtext_or_file (public) template::widget::richtext_or_file->template::widget::textarea_internal template::widget::textarea template::widget::textarea (public) template::widget::textarea->template::widget::textarea_internal template::widget::input template::widget::input (public) template::widget::textarea_internal->template::widget::input

Testcases:
No testcase defined.
Source code:
    upvar $attribute_reference attributes

    if { $mode ne "edit" } {
        set output ""
        if { $value ne "" } {
            append output  [ns_quotehtml $value]  [subst {<input type="hidden" name="$name" value="[ns_quotehtml $value]">}]
        }
    } else {
        if {$tag ne "textarea"} {
            set output "<$tag"
        } else {
            set output "<textarea name=\"$name\""
        }

        foreach attribute_name [array names attributes] {
            if {$attributes($attribute_name) eq ""} {
                append output $attribute_name"
            } else {
                append output $attribute_name=\"[ns_quotehtml $attributes($attribute_name)]\""
            }
        }
        append output ">[ns_quotehtml $value]</$tag>"
    }

    return $output
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-templating/tcl/widget-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: