Main Menu
Lecture 1
Lecture 2
Lecture 3
Lecture 4
Lecture 5
Lecture 7
 

 

 

WOComponents as Templates

Define common content (headers, footers, navigation bars, background) in a reusable component

Page template

create a nested component that can accept different (custom) HTML on each page

combines predefined HTML with custom HTML

WOCheckBoxMatrix is an example of this approach

WOComponentContent

A place holder to specify where custom HTML is to appear

Template Page - creates a component that wraps around the HTML content

Doesn't generate a particular HTML tag instead it reproduces the HTML provided by the parent component.

This page template consists of a Header, a custom area and a footer, which includes a navigation bar component

Normal Page

Parent page calls child page and child page produces HTML to draw page

Template Page

Parent page contains child page (template)

parent page passes custom HTML to child page

Child page wraps its HTML around parent's HTML to produce HTML to draw page

Parent page receives take ValuesFromRequest(), appendToResponse() and invokeAction() messages

Parent page passes them to template page

template page passes them to WoComponentContent object

WoComponentContent object passes them to custom components

Insert template component into parent page by dragging and dropping nested component

Now customise page by adding custom content to page WO