adapforms.web.handlers.xhtml
Class XHTMLRenderer

java.lang.Object
  extended by adapforms.web.handlers.xhtml.XHTMLRenderer
All Implemented Interfaces:
Renderer

public class XHTMLRenderer
extends java.lang.Object
implements Renderer

XHTML/AJAX specific renderer.
The form is rendered as a XHTML node, containing a number of JavaScript and CSS stylesheet references. AJAX events are coupled to every form element, to be handled by the XHTMLController.

Author:
Henrik Gammelmark, geemark@cs.au.dk

Constructor Summary
XHTMLRenderer()
           
 
Method Summary
 void invoke(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, WebSession session, RenderingType type)
          Invoke the handler.
(package private)  void renderRepeatEntry(WebSession session, FormPath path, java.io.PrintWriter out, RepeatElement element)
          Used by the XHTMLController to render repeat entries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XHTMLRenderer

public XHTMLRenderer()
Method Detail

invoke

public void invoke(javax.servlet.http.HttpServletRequest req,
                   javax.servlet.http.HttpServletResponse resp,
                   WebSession session,
                   RenderingType type)
            throws java.lang.Exception
Description copied from interface: Renderer
Invoke the handler.

Specified by:
invoke in interface Renderer
Parameters:
req - HTTP request
resp - HTTP response
session - Web session in question
type - Type of rendering to perform
Throws:
java.lang.Exception - if something goes wrong in the process

renderRepeatEntry

void renderRepeatEntry(WebSession session,
                       FormPath path,
                       java.io.PrintWriter out,
                       RepeatElement element)
Used by the XHTMLController to render repeat entries.

Parameters:
session - Web session being rendered
path - Full form path of the container to render
out - Where to print the rendered elements
element - The repeat element to render an entry of.