renderFor ( ctx, state )
Write template's output by calling state.write() 0 or more times
ctx is an ITraversalContext for the object being rendered (e.g.
the object the template is a method of). state is an IDOMletState
component used to supply arbitrary properties/utilities to child
DOMlets during template execution, and to provide access to the
current output stream and IWebInteraction . Both of these
parameters should be supplied to executed child nodes as-is, unless
the current DOMlet wishes to change them. (For example, a
TemplateDocument will normally change the context to point to its
traversal predecessor, rather than using itself as the target of
rendering.)
If a node wishes to add properties to the state for its children,
it should create a new IDOMletState with the old state as
its parent, then supply the new state to child nodes's renderFor()
method.
|