cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <>
Subject RE: [RT] Revisiting Woody's form definition
Date Wed, 30 Jul 2003 14:32:46 GMT
Sylvain Wallez wrote:
> Carsten, I think you need to know a bit of the internals of Woody. 
Yes, definitly!

> For a 
> single element of the form definition file, say <wd:field>, 3 classes 
> are involved in its processing :
> - FieldDefinitionBuilder : analyzes the <wd:field> element and from its 
> attributes and content creates a FieldDefinition
> - FieldDefinition : holds the characteristics of a <wd:field>. It is 
> cached, and only one instance of it exists in the system no matter how 
> often the form definition is used.
> - Field : holds the data for a particular use of the field definition. 
> It's what is referred to as "instance".
> So, when a form definition is used for the first time, it is parsed by 
> implementations of WidgetBuilder (FieldDefinitionBuilder is such an 
> implementation) that produce a tree (some widgets such as Form or 
> Repeater have child widgets) of WidgetDefinition objects 
> (FieldDefinition implements this interface). This tree is cached.
> When a form instance is created, the WidgetDefinition tree is crawled to 
> produce a Widget tree (Field is an implementation of Widget). These 
> objects are responsible for formating/parsing the values. These are very 
> lightweight objects that delegate most of their processing to their 
> WidgetDefinition.
> Hope this makes things clearer.
Yes, thanks, Sylvain!

So, actually the Widget Tree is created dynamically when needed. Now, is
it possible to hook into the building of this tree?


View raw message