Guidelines for Customizing Context Renderer
It is recommended that you apply the following guidelines if you configure a context renderer:
Use a context renderer exclusively to implement methods that only modify the UI. For example, a context renderer for a view can rearrange all the applets in the view as an Accordion panel.
Do not include business logic that modifies the user interface state.
A context renderer must not try to alter the life cycle of an individual control or field. If required, a plug-in wrapper must be implemented.
A context renderer for an applet must not try to alter the Document Object Model (DOM) for the other applets in a view. Similarly, the view based context renderer must not alter the DOM outside of the view container.
A context renderer is not an alternative for the physical renderer or plug-in wrapper. It can be used for a UI operation that can be leveraged by multiple Physical Renderers. For example, in the case of an accordion panel for an applet in a view, you can attach the same context renderer with different custom physical renderer for the view to take advantage of the accordion panel in all views, irrespective of the custom physical renderer.