- Publicity: Public Only All
dimensional-procs.tcl
Definition of dimensional selection bar widget and helper functions.
- Location:
- packages/acs-templating/tcl/dimensional-procs.tcl
- CVS Identification:
$Id: dimensional-procs.tcl,v 1.6 2024/10/16 09:21:22 gustafn Exp $
Procedures in this file
- ad_dimensional (public)
- ad_dimensional_sql (public)
Detailed information
ad_dimensional (public)
ad_dimensional [ -style style ] option_list [ url ] [ options_set ] \ [ optionstype ]
Generate an option bar from an option_list, which has the structure:
{ {variable "Title" defaultvalue { {value "Label" {key sql-clause}} ... } } ... }Here is an example of the option_list:set dimensional_list { {visited "Last Visit" 1w { {never "Never" {where "last_visit is null"}} {1m "Last Month" {where "last_visit + 30 > sysdate"}} {1w "Last Week" {where "last_visit + 7 > sysdate"}} {1d "Today" {where "last_visit > trunc(sysdate)"}} }} ..(more of the same).. }
- Switches:
- -style (optional)
- name of the adp file (without extension)
- Parameters:
- option_list (required)
- the structure with the option data provided
- url (optional)
- url target for select (if blank we set it to ad_conn url).
- options_set (optional)
- if not provided defaults to [ns_getform], for hilite of selected options.
- optionstype (optional, defaults to
"url"
)- only url is used now, was thinking about extending so we get radio buttons and a form since with a slow select updating one thing at a time would be stupid.
- Returns:
- HTML rendering
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- ad_dimensional
ad_dimensional_sql (public)
ad_dimensional_sql option_list [ what ] [ joiner ] [ options_set ]
Given what clause we are asking for and the joiner this returns the sql fragment
- Parameters:
- option_list (required)
- the structure with the option data provided
- what (optional, defaults to
"where"
)- look for such keys in the option_list
- joiner (optional, defaults to
"and"
)- join string for combining multiple clauses
- options_set (optional)
- ns_set for reading variables
- Returns:
- SQL clause
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- ad_dimensional