The Web Graph Database

wiki:Docs/HtmlTemplates

Html Templates

InfoGrid includes a templating framework for HTML and other composite document output.

Its core class is the TemplatesFilter, which needs to be part of the servlet FilterChain. It performs the following actions:

  1. Creates a StructuredResponse, and adds it to the incoming ServletRequest as an attribute
  2. Processes the FilterChain, buffering the generated output. If the Viewlet Framework is being used, this will execute the appropriate Viewlet. If the remaining FilterChain is aware of the Html Templates (such as the Viewlet Framework), it will populate the StructuredResponse instead of producing output directly.
  3. Report any generated exceptions to the StructuredResponse.
  4. Create the applicable StructuredResponseTemplate from the applications's StructuredResponseTemplateFactory.
  5. Apply the StructuredResponseTemplate to the StructuredResponse, thereby producing the output that is returned in response to the HTTP request. This is the actual formatting step that translates a structured representation of the response into serialized output, such as HTML.

See also:

Last modified 5 years ago Last modified on 01/19/10 05:59:39