|
[Deprecated API] | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | CURRENT API | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.interface21.context.support.ApplicationObjectSupport
|
+--com.interface21.web.servlet.view.AbstractView
|
+--com.interface21.web.servlet.view.xslt.AbstractXsltView
Convenient superclass for views rendered using an XSLT stylesheet. Subclasses must provide the XML W3C document to transform. They do not need to concern themselves with XSLT. Properties:
| Fields inherited from class com.interface21.context.support.ApplicationObjectSupport |
logger |
| Constructor Summary | |
AbstractXsltView()
Creates new XsltView |
|
| Method Summary | |
protected abstract org.w3c.dom.Node |
createDomNode(java.util.Map model,
java.lang.String root,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Subclasses must implement this method Return the XML node to transform. |
protected void |
doTransform(javax.servlet.http.HttpServletResponse response,
org.w3c.dom.Node dom)
Use TrAX to perform the transform |
boolean |
getCache()
Gets the cache. |
protected javax.xml.transform.Source |
getStylesheetSource(java.lang.String url)
Load the stylesheet. |
protected void |
initApplicationContext()
Set the ApplicationContext object used by this object. |
protected void |
renderMergedOutputModel(java.util.Map model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Renders the view given the specified model. |
void |
setCache(boolean cache)
Sets the cache. |
void |
setRoot(java.lang.String root)
Document root element name. |
void |
setStylesheet(java.lang.String url)
Set the URL of the XSLT stylesheet |
void |
setUriResolver(javax.xml.transform.URIResolver uriResolver)
Set the URIResolver used in the transform. |
| Methods inherited from class com.interface21.web.servlet.view.AbstractView |
addStaticAttribute, getContentType, getName, getStaticAttributes, render, setAttributes, setAttributesCSV, setContentType, setName, setRequestContextAttribute |
| Methods inherited from class com.interface21.context.support.ApplicationObjectSupport |
getApplicationContext, setApplicationContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.interface21.context.ApplicationContextAware |
setApplicationContext |
| Constructor Detail |
public AbstractXsltView()
| Method Detail |
public final void setStylesheet(java.lang.String url)
url - the URL of the XSLT stylesheetpublic final void setRoot(java.lang.String root)
root - document root element namepublic final void setUriResolver(javax.xml.transform.URIResolver uriResolver)
uriResolver - URIResolver to set. No URIResolver
will be set if this is null (this is the default).public final boolean getCache()
public final void setCache(boolean cache)
cache - The cache to set
protected final void initApplicationContext()
throws ApplicationContextException
initApplicationContext in class ApplicationObjectSupportctx - ApplicationContext object used by this objectnamespace - namespace this object is in: null means default namespaceApplicationContextException - if initialization attempted by this object
after it has access to the WebApplicatinContext fails
protected javax.xml.transform.Source getStylesheetSource(java.lang.String url)
throws ApplicationContextException
protected final void renderMergedOutputModel(java.util.Map model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
renderMergedOutputModel in class AbstractViewcom.interface21.web.servlet.view.AbstractViewmodel - combined output Map, with dynamic values
taking precedence over static attributesrequest - current HTTP requestresponse - current HTTP responsejava.io.IOException - if there is an IO exception trying to obtain
or render the viewjavax.servlet.ServletException - if there is any other error
protected abstract org.w3c.dom.Node createDomNode(java.util.Map model,
java.lang.String root,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
model - modelroot - name for root elementrequest - HTTP request. Subclasses won't normally use this, as request
processing should have been complete. However, we might to create
a RequestContext to expose as part of the model.response - HTTP response. Subclasses won't normally use this, however
there may sometimes be a need to set cookies.java.lang.Exception - we let this method throw any exception; the
AbstractXlstView superclass will catch exceptions
protected void doTransform(javax.servlet.http.HttpServletResponse response,
org.w3c.dom.Node dom)
throws java.lang.IllegalArgumentException,
java.io.IOException,
javax.servlet.ServletException
|
[Deprecated API] | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | CURRENT API | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||