com.ibm.designer.domino.xsp.api.visual
Interface AbstractVisualizationFactory.IVisualizationCallback

All Known Implementing Classes:
AbstractVisualizationFactory.RenderChildrenRecursiveCallback
Enclosing class:
AbstractVisualizationFactory

public static interface AbstractVisualizationFactory.IVisualizationCallback

An interface that gets invoked when the factory is printing a DOM Node. The callback is normally invoked when the factory has finished printing the opening tag, but has not printed the closing tag. The factory gives clients a chance to insert content between the opening and closing tags of a DOM Node.

A default implementation is also provided, com.ibm.designer.domino.xsp.api.visual.AbstractVisualizationFactory.recursiveCallback. The default implementation will recurse through all child nodes whose namespace is the standard XPages namespace (). If a node is encountered that does not belong to the XPages namespace then MarkupVisualizationRegistry is queried for a visualizer for the node in question. If a visualizer is returned then the com.ibm.designer.domino.xsp.api.visual.AbstractVisualizationFactory.getXSPMarkupForControl(Node, IVisualizationCallback, FacesRegistry) method is invoked on the factory to create markup for the node. If a factory is not returned (null), then the node is printed verbatim.

See Also:
AbstractVisualizationFactory.printNode(Node, IVisualizationCallback, FacesRegistry)

Method Summary
 java.lang.String renderInTag(org.w3c.dom.Node tagBeingRendered, FacesRegistry registry)
          Called while a node is being printed to buffer.
 boolean shouldRecurseInto(org.w3c.dom.Node node, FacesRegistry registry)
          Returns true if the print operation should recurse into the given tag.
 

Method Detail

renderInTag

java.lang.String renderInTag(org.w3c.dom.Node tagBeingRendered,
                             FacesRegistry registry)
Called while a node is being printed to buffer. This method is typically called while a node is being printed, after the opening tag has been printed but before the closing tag is printed. This method allows clients to insert custom markup between the opening and closing tag, e.g.
<xp:text>-renderInTag inserted this text-</xp:text>

Parameters:
tagBeingRendered - the node that is currently being printed
registry - the FacesRegistry for the current application
Returns:
any custom markup that should be inserted between the opening and closing tags of tagBeingRendered

shouldRecurseInto

boolean shouldRecurseInto(org.w3c.dom.Node node,
                          FacesRegistry registry)
Returns true if the print operation should recurse into the given tag. Clients should be careful of always returning true for this method as it will imply that the entire DOM of the provided tag will be recursed.

Parameters:
node - the node currently being printed
registry - the FacesRegistry for the current application
Returns:
true if the print code should render the children of the given node