Caplin Trader 4.8.0

Interface: module:br/presenter/node/TemplateAware

module:br/presenter/node/TemplateAware

Interface implemented by presentation nodes that need to dynamically specify the template that should be used to render them.

By default, presentation nodes held within a list (e.g. using the module:br/presenter/node/NodeList class) are all rendered using the same template — specified within the view. Sometimes, however, it can be useful to render some or all of the list using different templates. Presentation nodes can signal the need to specify the template dynamically by implementing the TemplateAware interface, and by returning the name of the template that should be used to render the node when #getTemplateName is invoked.