Web Oriented Object Framework

User Guide (Version 0.5b4)

User Guide (Version 0.5b4)

Displaying the page

NOTE This Quick Start chapter only describes templates that use the WTF format. However, note that you can add your own template processors to Woof! as described in Template processor plug-ins.

Having generated the new sequence, we now need a page to actually display it to the user. The page for this method is automatically generated from its view template app/controllers/views/fibonacci-generate-main.wtf. Currently, that still contains a stub so we will edit it to contain the following template.

% my variable seq
The first [llength $seq] numbers in the Fibonacci 
sequence are:
  [join $seq ", "]
  <a href='[request url]'>More</a>

Browsing to the URL will now display the following page:

Quick Start Example Generate page

Refreshing the page or clicking on the More link will generate additional numbers in the sequence.

The corresponding Woof! Template Format (WTF) template shown earlier is quite simple. It is essentially a mixture of display text (including HTML tags) and Tcl command and variable references that are replaced with the corresponding values by the Tcl subst command.

The two things to note in this simple case are: