template::tabstrip::add_tab (public)

 template::tabstrip::add_tab dlg_name name label template [ args... ]

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

Add a tab to the given tabstrip.

Parameters:
dlg_name (required)
name (required)
label (required)
template (required)

Partial Call Graph (max 5 caller/called nodes):
%3 template::adp_level template::adp_level (public) template::tabstrip::set_current_tab template::tabstrip::set_current_tab (public) template::util::get_opts template::util::get_opts (public) template::tabstrip::add_tab template::tabstrip::add_tab template::tabstrip::add_tab->template::adp_level template::tabstrip::add_tab->template::tabstrip::set_current_tab template::tabstrip::add_tab->template::util::get_opts

Testcases:
No testcase defined.
Source code:
  # Determine the current tab
  set level [template::adp_level]
  upvar #$level $dlg_name:properties properties

  template::util::get_opts $args

  # Set default params
  set code [list template::element create $dlg_name $name -label "$label"]
  lappend code -datatype text -widget tab -optional 

  # Set tab-specific params

  if { ![info exists opts(base_url)] } {
    if { [info exists properties(base_url)] } {
      # use global base_url
      lappend code -base_url $properties(base_url)
    } else {
      # use current page
      lappend code -base_url [ns_conn url]
    }
  }  

  lappend code -template $template 

  if {$properties(current_tab) eq $name} {
    lappend code -current 1
  } else {
    lappend code -current 0
  }

  {*}$code {*}$args

  upvar #$level $dlg_name:$name element

  # If this is the first tab being added, set it as current
  if { ![info exists properties(current_tab)] } {
    set_current_tab $dlg_name [lindex $properties(element_names) 0] 3
  }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: