public abstract class XFormImpl extends Object
Modifier and Type | Field and Description |
---|---|
static Namespace |
xformNS
The XForms namespace.
|
Constructor and Description |
---|
XFormImpl() |
Modifier and Type | Method and Description |
---|---|
abstract XFormInstance |
getFormInstance(DMSForm form,
FormContext ctx)
Get the XForms model from a form and form context.
|
abstract XFormInstance |
getFormInstance(HttpServletRequest req)
Get the XForms model and instance from the request.
|
static XFormImpl |
getInstance(HttpServletRequest req)
Use this method to get the xforms implementation.
|
abstract Page |
getResponsePage(Element res)
wrapts the response-element in a suitable
Page that supports streaming output |
abstract Element |
sendFormInstance(XFormInstance inst)
Normally, the changes of the form are sent back to the browser using the method
sendFormInstance(XFormInstance,HttpServletResponse) . |
abstract void |
sendFormInstance(XFormInstance inst,
HttpServletResponse res)
Send the form instance back to the browser.
|
abstract void |
sendFormInstance(XFormInstance inst,
HttpServletResponse res,
String[] repeatIds)
Send the form instance back to the browser.
|
abstract void |
setClientType(HttpServletRequest req)
Set the client type from request, called from getInstance.
|
abstract void |
setShowInvalid(boolean val)
Highlight the invalid elements on the client.
|
abstract void |
setValues(DMSForm form,
HttpServletRequest req)
Fill the form with the values from the request
|
abstract Page |
showPage(XHTMLPage p)
Convert an XHTMLPage with embedded XForms model and controls to a XHTML-Page suitable for the used browser.
|
public static final Namespace xformNS
public static XFormImpl getInstance(HttpServletRequest req)
req
- the HttpServletRequest, used for determining the client type. May be null.public abstract void setClientType(HttpServletRequest req)
req
- servlet request, may be null.public abstract Page showPage(XHTMLPage p) throws Exception
p
- the XHTMLPage containing XForms elementsException
public abstract XFormInstance getFormInstance(HttpServletRequest req) throws Exception
req
- the request from the server contains the Xforms model and instance dataException
public abstract XFormInstance getFormInstance(DMSForm form, FormContext ctx) throws Exception
form
- a form objectctx
- Exception
public abstract void sendFormInstance(XFormInstance inst, HttpServletResponse res) throws Exception
getFormInstance(HttpServletRequest)
.inst
- res
- method will write to the reponseException
public abstract Element sendFormInstance(XFormInstance inst) throws Exception
sendFormInstance(XFormInstance,HttpServletResponse)
. This variant gives you the possibility to manipulate the XML,
that is sent to the browser.inst
- Exception
public abstract void sendFormInstance(XFormInstance inst, HttpServletResponse res, String[] repeatIds) throws Exception
sendFormInstance(XFormInstance,HttpServletResponse)
:
If parts of the model are changed, that are used in "repeat" elements, for example for adding or removing subforms, this
use this method.inst
- res
- method will write to the reponserepeatIds
- an array of paths to the changed repeat data, for example "/data/form/subform[@id='1']/form"Exception
public abstract void setShowInvalid(boolean val)
val
- true for highlightingpublic abstract void setValues(DMSForm form, HttpServletRequest req) throws Exception
form
- a form objectreq
- Exception
@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.