Class adf.TocRenderer
Defined in: Toc.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Base Class that provides methods for rendering nodes in a toc control.
|
Method Attributes | Method Name and Description |
---|---|
Each implementation of adf.TocRenderer should use this method
to perform post rendering initailization required
This method is called after adf.TocRenderer#renderNode
The default implementation contains no functionality (just an empty function).
|
|
init(container)
This function takes the container on which the Toc Control needs to be render to.
|
|
renderNode(node)
Each implementation of adf.TocRenderer should use this method
to render the adf.TocNode based on its rendering style
This method is called after adf.TocRenderer#reset and before calling
adf.TocRenderer#renderNode
The default implementation contains no functionality (just an empty function).
|
|
reset()
Each implementation of adf.TocRenderer should use this method
to clear the contents of the rendered DOM Nodes.
|
|
Each implementation of adf.TocRenderer should use this method
add/update/modify DOM Nodes used by this renderer to render the adf.TocNodes
As an example, if this renderer renders the Toc Nodes in the tabular format
In its startRendering method , it may delete all the content in its Table Body
before starting the render Node phase
This method is called after adf.TocRenderer#reset and before calling
adf.TocRenderer#renderNode
The default implementation contains no functionality (just an empty function).
|
Class Detail
adf.TocRenderer()
Base Class that provides methods for rendering nodes in a toc control.
As a base class adf.TocRenderer defines five methods init(), startRendering(),
renderNode(), reset(), endRendering() which can be used by the dervied classes of this class to manage the rendering of
a node in a Toc Control.
Each of these named functions has an empty default implementation, so they need not be implemented if you choose.
In a nutshell, These methods illustrate the TOC Rendering lifecycle
1. Initializes the render [init()] 2. Reset if needed any DOM Containers on which the nodes or rendered [reset()] 3. Start the rendering by creating/deleting/replacing DOM Nodes of the renderer container or any pre-rendering settings required by the renderer [start Rendering()] 4. Render the Toc Node based on the renderer's style 5. Perform Post-rendering settings that need to be completed [endRendering() ]
Method Detail
endRendering()
Each implementation of adf.TocRenderer should use this method
to perform post rendering initailization required
This method is called after adf.TocRenderer#renderNode
The default implementation contains no functionality (just an empty function).
init(container)
This function takes the container on which the Toc Control needs to be render to.
Each implementation of adf.TocRenderer should use this method to
initailize the DOM Nodes used by that renderer and to set the token handlers needed for that Toc Control
The default implementation contains no functionality (just an empty function).
- Parameters:
- container
- DOM Node which is the container node for the Toc Control
renderNode(node)
Each implementation of adf.TocRenderer should use this method
to render the adf.TocNode based on its rendering style
This method is called after adf.TocRenderer#reset and before calling
adf.TocRenderer#renderNode
The default implementation contains no functionality (just an empty function).
- Parameters:
- node
reset()
Each implementation of adf.TocRenderer should use this method
to clear the contents of the rendered DOM Nodes. This method should be
called during the AJAX Updates by the adf.Toc#updateAsync before calling
the adf.TocRenderer#startRendering implementation
The default implementation contains no functionality (just an empty function).
startRendering()
Each implementation of adf.TocRenderer should use this method
add/update/modify DOM Nodes used by this renderer to render the adf.TocNodes
As an example, if this renderer renders the Toc Nodes in the tabular format
In its startRendering method , it may delete all the content in its Table Body
before starting the render Node phase
This method is called after adf.TocRenderer#reset and before calling
adf.TocRenderer#renderNode
The default implementation contains no functionality (just an empty function).