[TransWarp] More PWT Ideas (usage, not terminology!)

Roché Compaan roche at upfrontsystems.co.za
Fri Jul 25 16:06:34 EDT 2003

* Phillip J. Eby <pje at telecommunity.com> [2003-07-25 15:47]:
> Is that all a bit clearer now?

I think I got my terms mixed up because I understand how domlets are
defined in a template and was incorrectly thinking of the
ContentReplacer classes Text and List as DOMlets. Just to be clear: a
DOMLet is the xml node that defines the 'pattern' for data substitution.
The ContentReplacer uses this pattern to write data to the content of
the elements in this pattern. Does this sound right?

> test_templates goes a bit further than 
> this, as it wants to simulate the conditions when a template is called by 
> peak.web as an IWebPage.  So, it makes its subject traversable the 'app' of 
> the Interaction, and then traverses from interaction.root to the 'show' 
> method, which is where it has stuck the template it's testing.  It then 
> uses interaction.callObject(), which adapts the template to IWebPage and 
> calls render().  This will invoke the DOMletAsWebPage adapter, whose 
> render() method sets up the DOMletState and calls the document's 
> 'renderFor()' method.

This is where I couldn't connect the dots. I could'nt see how you get
from interaction.callObject to the renderFor for each ContentReplacer
and didn't understand what role traversal played in setting up 'app' as
data provider for the domlet.

I want to try and write more ContentReplacer classes for form building
and then use them in a few DOMlets to get a feel for PWT.

Thanks for the pointers.

Roché Compaan
Upfront Systems                 http://www.upfrontsystems.co.za

More information about the PEAK mailing list