template::widget::table::default_column_def (public)

 template::widget::table::default_column_def name [ level ]

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

Create the default column definition if none exists

Parameters:
name (required)
level (optional, defaults to "2")

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.
Source code:

    upvar $level "tablewidget:${name}" widget

    if { ![info exists widget(column_def)] } {
    # Get the column definition based on the first row of the datasource
        upvar $level "tw_${name}_rows:rowcount" rowcount
        if { $rowcount < 1 } {
            error "No column definition specified and no rows are available to generate the default column definition for tablewidget $name"
        }
        upvar $level "tw_${name}_rows:1" row
        set column_def [list]
        foreach name [array names row] {
            lappend column_def $name [list]
        }
        set widget(column_def) $column_def
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: