public class ServletAdapter extends AbstractChibaAdapter (Code)
integrates XForms Processor into Web-applications and handles request processing. This is the default
implementation of ChibaAdapter and besides handling the interaction it also
manages a UIGenerator to build the rendered output for the browser.
author: joern turner version: $Id$
buildUI(Writer responseWriter) generates the user interface.
public UIGenerator
createUIGenerator() factory method for creating UIGenerator instances.
public void
dispatch(ChibaEvent event) ServletAdapter is special in its event handling - it simply ignores the concrete UIEvent
and applies all request params and the triggerd action in one batch process.
public void
forward(Map response) Instructs the application environment to forward the given response.
final public void buildUI() throws XFormsException(Code)
generates the user interface.
This method generates the user interface.
throws: XFormsException -
buildUI
public void buildUI(Writer responseWriter) throws XFormsException(Code)
generates the user interface.
This conveniance method generates the user interface
using a java.io.Writer.
Parameters: responseWriter - the Writer to use for the result stream throws: XFormsException -
createUIGenerator
public UIGenerator createUIGenerator() throws XFormsException(Code)
factory method for creating UIGenerator instances.
the created UIGenerator instance throws: XFormsException -
dispatch
public void dispatch(ChibaEvent event) throws XFormsException(Code)
ServletAdapter is special in its event handling - it simply ignores the concrete UIEvent
and applies all request params and the triggerd action in one batch process.
Parameters: event - ignored throws: XFormsException -
Instructs the application environment to forward the given response.
Parameters: response - a map containing at least a response stream and optionalheader information.
stores a context property into Chiba's context hashmap.
Parameters: key - the key to associate with val Parameters: val - the value object to store
setContextRoot
public void setContextRoot(String contextRoot)(Code)
sets the context root for the webapp. This is used to build the correct pathes of relative path-statements
Parameters: contextRoot - the root of the webapp
Instructs the application environment to setRedirect to the given URI.
Parameters: uri - an absolute URI.
setStylesheet
public void setStylesheet(String stylesheetFile)(Code)
sets the name of the xslt stylesheet to use for building the UI
Parameters: stylesheetFile - the name of the xslt stylesheet to use for building the UI
setStylesheetPath
public void setStylesheetPath(String stylesPath)(Code)
sets the path where to find the xslt stylesheets
Parameters: stylesPath - the path where to find the xslt stylesheets
uses an URI in string representation to point to the XForms document to process. This URI always comes
as a http Url in the context of servlet processing.
Parameters: uriString - a http URI pointing to the requested XForms throws: URISyntaxException - thrown in case an invalid http Url is passed in throws: XFormsException - thrown in case the processor couldn't be initialized from given URI, mostly likely dueto a problem in the form.
shutdown
public void shutdown() throws XFormsException(Code)
terminates the XForms processing. right place to do cleanup of resources.
throws: org.chiba.xml.xforms.exception.XFormsException -