Platform SDK: CDO 1.2.1 |
Because renderer objects can be stored, you can choose the best time to create them:
In fact, it is usually most efficient to create a renderer object before opening the object that it will render. Microsoft® Outlook™ Web Access, for example, creates rendering objects for mailboxes before needing them and stores them in the Active Server Pages Session object. Web Access uses only two rendering objects: one ObjectRenderer and one ContainerRenderer. This means that all its rendering is done through calls to methods on one of these two objects.
Renderer objects were designed to be reused. Stored renderers retain the property values they held for previously rendered objects until these properties are given new values.
Note Do not confuse the RenderProperty method of the ContainerRenderer object with that object’s Render method. The Render method renders rows of a folder or address book collection. The RenderProperty method renders the designated property of the parent of the object specified by the DataSource property. It renders the property in place, either to the Active Server Pages Response object or to a bstr string which will then be displayed. Note that bstr (strHTML) is a Pascal-like string construct used by Microsoft® Visual Basic®; it is a NULL-terminated, Unicode, wide-character string used by IDispatch.