Class WbzContainer


class WbzContainer

WbzContainer allows the embedding views into an host language lile HTML or XUL. There is no equivalent in XSLT. In XSLT these elements can be written in the so called template-bodies under the most elements (see XSLT-specification). Wobzilla can also use this notation, by transparently wrapping those elements under an WbzContainer see below.

Embedding of components into a host-language

Enables the use of templates in Wobzilla. The following examples shows the embedding into a HTML-Table:

   <html:td><wbz:value-of select="@firstname"/></html:td>
   <html:td><wbz:value-of select="@lastname"/></html:td>

Aggregation of multiple views

WbzContainer can be used to aggregate multiple views. That should simplify the managemant of child-views for other components. They only need to take care of the one container-child. The components can automaticaly create a wbz:container if they find more than one view-configuration or an element, that doesn't belong to the wbz:namespace. Theres the helper method WBZ_wrapConfig. All components provied by mozilla use this method, to make the use of the WbzContainer transparent to the creator of the stylesheet. They can use the XSLT-syntax without the container-instruction. But you will encounter the container notation in the samples and in the API. This is to point up the interaction of the inidividual components.

Use of local variables

Local variables must be declared at the start of a container-configuration. The container passes all variable instructions to the wobzilla.variableFactory that creates a wobzilla.variableHandler. This handler evalutates the variables and writes the result it into the context entry wobzilla.local. All sub-views of the container will can access this variable through wobzilla.local.

In the requery-method of the container, first the requery-method of the variableHandler is called, to check if a variable value has changed, and update the context if neccessary. If it has changed, the localVariableChanged flag will be set on the changeEvent to notify all childs of the container, so they can perform recalculations, where they are neccessary.