com.oroad.stxx.xform
Class DOMForm

java.lang.Object
  extended byorg.apache.struts.action.ActionForm
      extended bycom.oroad.stxx.xform.AbstractXMLForm
          extended bycom.oroad.stxx.xform.DOMForm
All Implemented Interfaces:
java.io.Serializable, XMLForm

public class DOMForm
extends AbstractXMLForm
implements XMLForm, java.io.Serializable

A form that uses W3C DOM to store the form data

Author:
Don Brown
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.oroad.stxx.xform.AbstractXMLForm
defaultXML, form, formPath, log, name, phase, schema, schemaNS, vsEnabled, xml
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
DOMForm()
           
 
Method Summary
 org.w3c.dom.Document getDefaultXML()
          Gets the default xml
 org.w3c.dom.Document getXML()
          Gets the DOM document
 void loadState(java.io.InputStream in)
          Loads the XML from the inputstream
 void outputXML(java.io.OutputStream out)
          Serializes the XML
 void prePopulate()
          Called before the form is populated
 void reset()
          Resets the form
 void setDefaultXML(org.w3c.dom.Document doc)
          Sets the default xml
 void setXML(org.w3c.dom.Document xml)
          Sets the DOM document
 
Methods inherited from class com.oroad.stxx.xform.AbstractXMLForm
getForm, getFormPath, getFormValidator, getLog, getName, getPhase, getSchemaNS, getValue, getValue, isInitialized, isViewstateEnabled, reset, save, setForm, setFormPath, setName, setPhase, setSchema, setSchemaNS, setValue, setViewstateEnabled, validate, validate
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.oroad.stxx.xform.XMLForm
getForm, getFormPath, getName, getPhase, getSchemaNS, getValue, getValue, isInitialized, isViewstateEnabled, save, setForm, setFormPath, setName, setPhase, setSchema, setSchemaNS, setValue, setViewstateEnabled, validate
 

Constructor Detail

DOMForm

public DOMForm()
Method Detail

prePopulate

public void prePopulate()
Called before the form is populated

Specified by:
prePopulate in interface XMLForm
Overrides:
prePopulate in class AbstractXMLForm

getXML

public org.w3c.dom.Document getXML()
Gets the DOM document

Returns:
The document

setXML

public void setXML(org.w3c.dom.Document xml)
Sets the DOM document

Specified by:
setXML in interface XMLForm
Specified by:
setXML in class AbstractXMLForm
Parameters:
xml - The new document

setDefaultXML

public void setDefaultXML(org.w3c.dom.Document doc)
Sets the default xml

Specified by:
setDefaultXML in interface XMLForm
Specified by:
setDefaultXML in class AbstractXMLForm
Parameters:
doc - The default XML

getDefaultXML

public org.w3c.dom.Document getDefaultXML()
Gets the default xml

Returns:
The default XML

reset

public void reset()
Resets the form

Specified by:
reset in interface XMLForm
Overrides:
reset in class AbstractXMLForm

loadState

public void loadState(java.io.InputStream in)
Loads the XML from the inputstream

Specified by:
loadState in interface XMLForm
Specified by:
loadState in class AbstractXMLForm
Parameters:
in - The inputstream

outputXML

public void outputXML(java.io.OutputStream out)
Serializes the XML

Specified by:
outputXML in interface XMLForm
Specified by:
outputXML in class AbstractXMLForm
Parameters:
out - The outputstream