|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.struts.action.ActionForm
com.oroad.stxx.xform.AbstractXMLForm
Abstract XMLForm that implements all methods not involving the actual XML library used to store the form. While this class extends the Struts action form, it can be used by containers that have nothing to do with servlets provided the getSchemaStream method is overridden (i.e. a SOAP container).
| Field Summary | |
protected java.lang.Object |
defaultXML
The default xml document |
protected org.xmlform.Form |
form
The underlying XMLForms form |
protected java.lang.String |
formPath
The path to the form xml |
protected org.apache.commons.logging.Log |
log
The logging instance |
protected java.lang.String |
name
The name of the form |
protected java.lang.String |
phase
The current validation phase |
protected java.io.InputStream |
schema
The path to the schema |
protected java.lang.String |
schemaNS
The namespace of the schema |
protected boolean |
vsEnabled
If viewstate is enabled |
protected java.lang.Object |
xml
The xml document |
| Fields inherited from class org.apache.struts.action.ActionForm |
multipartRequestHandler, servlet |
| Constructor Summary | |
AbstractXMLForm()
Initializes the log for the current class |
|
| Method Summary | |
org.xmlform.Form |
getForm()
Gets the underlying XMLForm form |
java.lang.String |
getFormPath()
Gets the form path |
protected org.xmlform.validation.Validator |
getFormValidator()
Determines the current validator using the schema namespace and sets the current phase if the validator supports multi-phase validation. |
protected org.apache.commons.logging.Log |
getLog()
|
java.lang.String |
getName()
Gets the name of the form |
java.lang.String |
getPhase()
Gets the validation phase |
java.lang.String |
getSchemaNS()
Gets the schema namespace |
java.lang.String |
getValue(java.lang.String xpath)
Gets the value at the xpath path |
java.lang.String |
getValue(java.lang.String xpath,
java.lang.String def)
Gets the value at the xpath path |
boolean |
isInitialized()
Determines if the form is initialized |
boolean |
isViewstateEnabled()
Gets the validation phase |
abstract void |
loadState(java.io.InputStream in)
Loads the XML from the inputstream |
abstract void |
outputXML(java.io.OutputStream out)
Serializes the XML |
void |
prePopulate()
Called before the form is populated |
void |
reset()
Resets the form |
void |
reset(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
Resets the form |
java.lang.String |
save()
Saves the form and returns a String status code |
abstract void |
setDefaultXML(org.w3c.dom.Document doc)
Sets the default xml |
void |
setForm(org.xmlform.Form form)
Sets the underlying XMLForm form |
void |
setFormPath(java.lang.String path)
Sets the form path |
void |
setName(java.lang.String name)
Sets the name of the form |
void |
setPhase(java.lang.String phase)
Sets the validation phase |
void |
setSchema(java.io.InputStream schema)
Sets the schema path |
void |
setSchemaNS(java.lang.String schema)
Sets the schema namespace |
void |
setValue(java.lang.String xpath,
java.lang.Object val)
Sets the value at the xpath path |
void |
setViewstateEnabled(boolean val)
Sets the validation phase |
abstract void |
setXML(org.w3c.dom.Document doc)
Sets the form xml |
java.util.List |
validate()
Validates the form and generates a list of violations. |
org.apache.struts.action.ActionErrors |
validate(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
Validates the form |
| 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 |
| Field Detail |
protected transient org.apache.commons.logging.Log log
protected java.lang.Object xml
protected java.lang.Object defaultXML
protected transient org.xmlform.Form form
protected java.io.InputStream schema
protected java.lang.String schemaNS
protected java.lang.String phase
protected java.lang.String name
protected java.lang.String formPath
protected boolean vsEnabled
| Constructor Detail |
public AbstractXMLForm()
| Method Detail |
protected org.apache.commons.logging.Log getLog()
public abstract void loadState(java.io.InputStream in)
loadState in interface XMLFormin - The inputstreampublic abstract void setDefaultXML(org.w3c.dom.Document doc)
setDefaultXML in interface XMLFormdoc - The default XMLpublic abstract void setXML(org.w3c.dom.Document doc)
setXML in interface XMLFormdoc - The default XMLpublic boolean isInitialized()
isInitialized in interface XMLFormpublic java.lang.String save()
save in interface XMLFormpublic void setSchema(java.io.InputStream schema)
setSchema in interface XMLFormschema - The new schema pathpublic void setName(java.lang.String name)
setName in interface XMLFormname - The new name valuepublic java.lang.String getName()
getName in interface XMLFormpublic java.lang.String getSchemaNS()
getSchemaNS in interface XMLFormpublic void setSchemaNS(java.lang.String schema)
setSchemaNS in interface XMLFormschema - The new schema namespacepublic void setFormPath(java.lang.String path)
setFormPath in interface XMLFormpath - The new formPath valuepublic java.lang.String getFormPath()
getFormPath in interface XMLFormpublic boolean isViewstateEnabled()
isViewstateEnabled in interface XMLFormpublic void setViewstateEnabled(boolean val)
setViewstateEnabled in interface XMLFormval - The new viewstateEnabled valuepublic java.lang.String getPhase()
getPhase in interface XMLFormpublic void setPhase(java.lang.String phase)
setPhase in interface XMLFormphase - The new phase valuepublic void setForm(org.xmlform.Form form)
setForm in interface XMLFormform - The new form valuepublic org.xmlform.Form getForm()
getForm in interface XMLForm
public void reset(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
mapping - Description of the Parameterrequest - Description of the Parameterpublic void reset()
reset in interface XMLFormpublic abstract void outputXML(java.io.OutputStream out)
outputXML in interface XMLFormout - The outputstreampublic java.util.List validate()
validate in interface XMLFormpublic void prePopulate()
prePopulate in interface XMLForm
public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
mapping - The action mappingrequest - The http request
public java.lang.String getValue(java.lang.String xpath)
getValue in interface XMLFormxpath - The xpath path
public java.lang.String getValue(java.lang.String xpath,
java.lang.String def)
getValue in interface XMLFormxpath - The xpath pathdef - The default value
public void setValue(java.lang.String xpath,
java.lang.Object val)
setValue in interface XMLFormxpath - The xpath pathval - The valueprotected org.xmlform.validation.Validator getFormValidator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||