Description

View Processors are used by the GenericMVCPortlet to render content in the resulting page. Any templating engine could be potentially used as long as there is a corresponding ViewProcessor. Below is the list of ViewProcessors as well as guidelines on when they should be used.

View Processors

Velocity

View Processor that allows a velocity template to be used to render content. This processor dumps it's content directly to the servlet's output stream.a

JSP

View Processor that allows a JSP template to be used to render content. This processor dumps it's content directly to the servlet's output stream.a

BufferedVelocity

View Processor that allows a velocity template to be used to render content. This processor buffers the content so that during the render phase, a portlet's title can be set by an action. In order to see the title change immediately, it is suggested that you use the Buffered Simple Title Control. This control calls getContent on the portlet, allowing the portlet to change the title. It will then render the newly set title and the content that was buffered.

**WARNING** Using the Buffered Simple Title Control without one of the Buffered* ViewProcessors could result in undesired behavior. Since the Velocity and JSP view processors write their content directly to the servlet output stream, it is possible that the content could be rendered before the title is rendered.

Setting Portlet Titles at Runtime

BufferedJSP

View Processor that allows a JSP template to be used to render content. This processor buffers the content so that during the render phase, a portlet's title can be set by an action. In order to see the title change immediately, it is suggested that you use the Buffered Simple Title Control. This control calls getContent on the portlet, allowing the portlet to change the title. It will then render the newly set title and the content that was buffered.

**WARNING** Using the Buffered Simple Title Control without one of the Buffered* ViewProcessors could result in undesired behavior. Since the Velocity and JSP view processors write their content directly to the servlet output stream, it is possible that the content could be rendered before the title is rendered.

Setting Portlet Titles at Runtime

XSL

View Processor that renders an XML file with a specified stylesheet. Rendered output will be based on media type passed in by the browser.

RSS

View Processor that renders an RSS file. This processor can obtain the title and description from the XML and set the porlet's title and description during it's render phase.