com.oroad.stxx.transform
Class CachedXFormTransformer
java.lang.Object
com.oroad.stxx.transform.AbstractSAXTransformer
com.oroad.stxx.transform.AbstractXSLTransformer
com.oroad.stxx.transform.CachedXSLTransformer
com.oroad.stxx.transform.CachedXFormTransformer
- All Implemented Interfaces:
- Transformer
- public class CachedXFormTransformer
- extends CachedXSLTransformer
- implements Transformer
This transformer extends the XSL transformer to add support for XForms by
using the XMLForm library.
- Author:
- Don Brown
Fields inherited from class com.oroad.stxx.transform.AbstractSAXTransformer |
allowURLDebug, builder, cache, context, debugXMLPath, expiryTime, log, name, resolveFromTemplatePath, rules, transFactory, writeXMLDebug |
Method Summary |
protected void |
addErrors(javax.servlet.http.HttpServletRequest request,
org.xmlform.Form form,
java.util.Locale locale,
org.apache.struts.util.MessageResources msg)
Adds violations to the xform taken from the action errors. |
void |
init(java.lang.String name,
StxxProperties props,
javax.servlet.ServletContext context,
BuilderRules rules)
Initializes the transformer |
void |
transform(ActionTransform trans,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Creates and transforms the XML using XSL and a special XMLForm
transformer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CachedXFormTransformer
public CachedXFormTransformer()
- Constructor
init
public void init(java.lang.String name,
StxxProperties props,
javax.servlet.ServletContext context,
BuilderRules rules)
- Initializes the transformer
- Specified by:
init
in interface Transformer
- Overrides:
init
in class CachedXSLTransformer
- Parameters:
props
- The propertiescontext
- The servlet contextrules
- The builder rulesname
- Description of the Parameter
transform
public void transform(ActionTransform trans,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws TransformerException
- Creates and transforms the XML using XSL and a special XMLForm
transformer.
- Specified by:
transform
in interface Transformer
- Overrides:
transform
in class CachedXSLTransformer
- Parameters:
trans
- The value object holding transformation
informationresponse
- The response objectrequest
- The request object
- Throws:
TransformerException
- If something goes wrong
addErrors
protected void addErrors(javax.servlet.http.HttpServletRequest request,
org.xmlform.Form form,
java.util.Locale locale,
org.apache.struts.util.MessageResources msg)
- Adds violations to the xform taken from the action errors. Also looks
up error keys in the message resources
- Parameters:
request
- The http requestform
- The XMLForm formlocale
- The current localemsg
- The The message resources