Samples

Templating System : Demo As the links reveal, the "Data" files have the extension .tcl and the "Template" files have .adp . If you want to see a little behind the scenes, you can look at the Tcl code into which we compile the template. The last column will deliver the resulting page to your browser.

Mechanisms underlaid in red are known to not work.

General

DescriptionDataTemplateCompiled
Template
Output
Simple variable substitutionViewViewViewView
Using bind variables in your queryViewViewViewView
A plain Tcl page that returns its own outputViewNoneNoneView
Conditional ExpressionsViewViewViewView
CommentsNoneViewViewView

Combining templates

DescriptionDataTemplateCompiled
Template
Output
Include a template within another templateView include
included
include
included
View
Wrap a page within a master templateNone Slave
Master
Slave
Master
View
Using the default masterNoneViewViewView
Include with master and recursion.
Remember Fibonacci from pset 1, exercise 1?
Start
Included
Master
Start
Included
Master
Start
Included
Master
View

Embedded Tcl

DescriptionDataTemplateCompiled
Template
Output
Tcl escape with implicit outputViewViewViewView
Tcl escape with explicit outputNoneViewViewView
Template chunks within escaped Tcl code blocksViewViewViewView
Puts (if you absolutely must)ViewViewViewView

Iteration

To see the following examples with different data, you can enter additional users into the sample table with "a simple form" or change them with "editing: several pages in one" in section Using the Form Manager below.
DescriptionDataTemplateCompiled
Template
Output
Repeating template chunks for each row of a query resultViewViewViewView
Generating the multirow datasource in TCLViewViewViewView
Repeating template chunks for each row of a query result, with custom manipulation of dataViewViewViewView
Repeating template chunks with grouping ViewViewViewViewViewViewViewViewViewViewViewView
Repeating template chunks as cells of a grid
Repeating template chunks for each element of a list

Both Iteration and Composition

ViewPlain
FancyPlain
FancyPlain
Fancy
AbsoluteViewOuter
IncludedOuter
IncludedViewViewViewViewView
DescriptionDataTemplateCompiled
Template
Output
Apply different skins to the same data
Passing a multirow datasource to an included page
Processing a template from a string (not file)

Using ListBuilder

DescriptionDataTemplateCompiled
Template
Output
Simplest (single-column) list, no features View .tcl
postgres query
oracle query
No master
W/ master
No master
W/ master
No master
W/ master
Add some columns View .tcl
postgres query
oracle query
ViewViewView
Add the ability to sort by any column View .tcl
postgres query
oracle query
ViewViewView
Link the title to a one-note detail page index
detail
index
detail
index
detail
View
Add a bulk action to delete all checked notes index
delete
postgres query
oracle query
indexindexView
Add a single/non-bulk action to create a note index
add-edit
index
add-edit
index
add-edit
View
Add a filter index
postgres query
oracle query
index
index
View
Add pagination with no page group cache index
postgres query
oracle query
index
index
View
Add page group caching to pagination (no looks difference) index
add-edit
delete
index
index
View

Forms

DescriptionDataTemplateCompiled
Template
Output
Using ad_page_contractTarget Form
Target
Error Page
Form
Target
Error Page
Form
Target
 
Report an error related to a request.ViewViewPlainView

Using the Form Manager.

ViewViewViewViewViewSimple
GriddedSimple
GriddedSimple
GriddedViewViewViewViewViewViewViewInline Error MessageSitewide Error PageValid RequestViewViewViewViewViewViewViewViewViewSubmit
ConfirmSubmit
ConfirmViewViewViewViewViewViewViewViewView
DescriptionDataTemplateCompiled
Template
Output
A simple form
A form with button groups
A form with Select widgets
Custom validation of a request
A form with the Date widget
Editing: several pages in one
A form with a custom confirmation page
A form with display/edit modes
A form with multiple submit buttons