com.opensymphony.webwork.views.xslt |
The new xslt view supports an extensible Java XML adapter framework that makes
it easy to customize the XML rendering of objects and to incorporate structured
XML text and arbitarary DOM fragments into the output.
The XSLTResult class now uses an extensible adapter factory for rendering the
WebWork action Java object tree to an XML DOM for consumption by the
stylesheet. Users can easily register their own adapters to produce custom XML
views of Java types or simply extend a default "String" adapter and return
plain or XML text to be incorporated into the DOM. The new adapter mechanism
is capable of proxying existing DOM trees and incorporating them into the
results, so you can freely mix DOMs produced from other sources into your
result tree.
A default java.util.Map adapter is also now provided to render Maps to XML.
Please see the javadoc on the AdapterFactory for more details.
|
Java Source File Name | Type | Comment |
AbstractAdapterElement.java | Class | AbstractAdapterElement extends the abstract Node type and implements
the DOM Element interface. |
AbstractAdapterNode.java | Class | AbstractAdapterNode is the base for childAdapters that expose a read-only view
of a Java object as a DOM Node. |
AdapterFactory.java | Class | AdapterFactory produces Node adapters for Java object types.
Adapter classes are generally instantiated dynamically via a no-args constructor
and populated with their context information via the AdapterNode interface.
This factory supports proxying of generic DOM Node trees, allowing arbitrary
Node types to be mixed together. |
AdapterNode.java | Interface | |
ArrayAdapter.java | Class | |
BeanAdapter.java | Class | This class is the most general type of adapter, utilizing reflective introspection to present a DOM view of all of
the public properties of its value. |
CollectionAdapter.java | Class | |
MapAdapter.java | Class | MapAdapter adapters a java.util.Map type to an XML DOM with the following
structure:
...
...
... |
ProxyAttrAdapter.java | Class | ProxyAttrAdapter is a pass-through adapter for objects which already
implement the Attr interface. |
ProxyElementAdapter.java | Class | ProxyElementAdapter is a pass-through adapter for objects which already
implement the Element interface. |
ProxyNamedNodeMap.java | Class | A NamedNodeMap that wraps the Nodes returned in their proxies. |
ProxyNodeAdapter.java | Class | ProxyNodeAdapter is a read-only delegating adapter for objects which already
implement the Node interface. |
ProxyTextNodeAdapter.java | Class | ProxyTextNodeAdapter is a pass-through adapter for objects which already
implement the Text interface. |
ServletURIResolver.java | Class | ServletURIResolver is a URIResolver that can retrieve resources from the servlet context using the scheme "res". |
SimpleAdapterDocument.java | Class | SimpleAdapterDocument adapted a Java object and presents it as
a Document. |
SimpleNodeList.java | Class | |
SimpleTextNode.java | Class | |
StringAdapter.java | Class | StringAdapter adapts a Java String value to a DOM Element with the specified
property name containing the String's text.
e.g. |
XSLTResult.java | Class | XSLTResult provides support for XSLT generated views of WebWork actions.
XSLTResult dynamically creates a DOM representation of the invoking WebWork
action object and applies a specified stylesheet to it.
The DOM representation of the WebWork action is produced by JavaBeans
style introspection of the properties of the action using an
extensible AdapterFactory. |
XSLTResultTest.java | Class | Unit test for
XSLTResult . |