fi.hut.tml.xsmiles.mlfc.xforms.dom
Class SubmissionElementImpl

java.lang.Object
  extended byorg.apache.xerces.dom.NodeImpl
      extended byorg.apache.xerces.dom.ChildNode
          extended byorg.apache.xerces.dom.ParentNode
              extended byorg.apache.xerces.dom.ElementImpl
                  extended byorg.apache.xerces.dom.ElementNSImpl
                      extended byfi.hut.tml.xsmiles.dom.XSmilesElementImpl
                          extended byfi.hut.tml.xsmiles.dom.VisualElementImpl
                              extended byfi.hut.tml.xsmiles.mlfc.xforms.dom.XFormsElementImpl
                                  extended byfi.hut.tml.xsmiles.mlfc.xforms.dom.ModelBoundElementImpl
                                      extended byfi.hut.tml.xsmiles.mlfc.xforms.dom.SubmissionElementImpl
All Implemented Interfaces:
java.lang.Cloneable, CSSStyleChangeListener, org.w3c.dom.ls.DOMWriterFilter, org.w3c.dom.Element, ElementWithContext, org.w3c.dom.events.EventListener, org.w3c.dom.events.EventTarget, InitializableElement, org.w3c.dom.Node, org.w3c.dom.traversal.NodeFilter, org.w3c.dom.NodeList, PseudoClassController, ResourceFetcher, java.io.Serializable, StylableElement, Submission, org.w3c.dom.TypeInfo, VisualElement, XFormsConstants, XFormsElement, XSmilesLayoutReference

public class SubmissionElementImpl
extends ModelBoundElementImpl
implements Submission, org.w3c.dom.events.EventListener, org.w3c.dom.ls.DOMWriterFilter

XForm/SubmitInfo element

Author:
Mikko Honkala
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl
XSmilesElementImpl.PseudoNodeList
 
Field Summary
protected  java.lang.String _boundary
           
protected  java.lang.String _start
           
protected static short MODE_FORMDATA
           
protected static short MODE_RELATED
           
protected  java.util.Hashtable properties
           
protected  java.lang.Thread submitThread
           
 
Fields inherited from class fi.hut.tml.xsmiles.mlfc.xforms.dom.ModelBoundElementImpl
binding_state, contextNode, refNode, refNodes
 
Fields inherited from class fi.hut.tml.xsmiles.mlfc.xforms.dom.XFormsElementImpl
debugEvents, EVENTS_NS, handler, inited, ownerDoc
 
Fields inherited from class fi.hut.tml.xsmiles.dom.VisualElementImpl
views
 
Fields inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl
DESTROYED, elementStatus, INITIALIZED, INITIALIZING, setPseudoClasses, style, UNINITIALIZED, xblpropname
 
Fields inherited from class org.apache.xerces.dom.ElementNSImpl
localName, namespaceURI
 
Fields inherited from class org.apache.xerces.dom.ElementImpl
attributes, name
 
Fields inherited from class org.apache.xerces.dom.ParentNode
firstChild, fNodeListCache, ownerDocument
 
Fields inherited from class org.apache.xerces.dom.ChildNode
nextSibling, previousSibling
 
Fields inherited from class org.apache.xerces.dom.NodeImpl
DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, ID, IGNORABLEWS, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_DISCONNECTED, TREE_POSITION_EQUIVALENT, TREE_POSITION_FOLLOWING, TREE_POSITION_PRECEDING, TREE_POSITION_SAME_NODE, UNNORMALIZED
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Fields inherited from interface org.w3c.dom.traversal.NodeFilter
FILTER_ACCEPT, FILTER_REJECT, FILTER_SKIP, SHOW_ALL, SHOW_ATTRIBUTE, SHOW_CDATA_SECTION, SHOW_COMMENT, SHOW_DOCUMENT, SHOW_DOCUMENT_FRAGMENT, SHOW_DOCUMENT_TYPE, SHOW_ELEMENT, SHOW_ENTITY, SHOW_ENTITY_REFERENCE, SHOW_NOTATION, SHOW_PROCESSING_INSTRUCTION, SHOW_TEXT
 
Fields inherited from interface fi.hut.tml.xsmiles.mlfc.xforms.XFormsConstants
ACCESSKEY, ACTION_ATTRIBUTE, ACTION_ELEMENT, ACTIVATE_EVENT, ACTIVE_CASE_PSEUDOCLASS, ALERT_ELEMENT, ALERT_EVENT, APPEARANCE_ATTRIBUTE, AT_ATTRIBUTE, BasicDataFactoryClassName, BEFORE_ATTRIBUTE, BIND_ATTRIBUTE, BIND_ELEMENT, BINDING_EXCEPTION, BLUR_EVENT, BUBBLES_ATTRIBUTE, BUTTON_ELEMENT, CALCULATE_ATTRIBUTE, CANCELABLE_ATTRIBUTE, CAPTION_CHANGED, CAPTION_ELEMENT, CASE_ATTRIBUTE, CASE_ELEMENT, CDATA_SECTION_ELEMENTS_ATTRIBUTE, CHOICES_ELEMENT, COMPUTE_EXCEPTION, CONSTRAINT_ATTRIBUTE, CONTROL_ATTRIBUTE, COPY_ELEMENT, DELETE_ELEMENT, DELETE_EVENT, DESELECT_EVENT, DESTROY_ELEMENT, DESTROY_EVENT, DISABLED_EVENT, DISABLED_PSEUDOCLASS, DISPATCH_ELEMENT, DUPLICATE_ELEMENT, DUPLICATE_EVENT, ENABLED_EVENT, ENABLED_PSEUDOCLASS, ENCODING_ATTRIBUTE, END_ATTRIBUTE, EXTENSION, EXTERNAL_LINKING_ATTR, FILENAME, FILENAME_ELEMENT, FOCUS_EVENT, FOCUSIN_NOTIFICATION_EVENT, FOCUSOUT_NOTIFICATION_EVENT, FUNC_INDEX, FUNC_NODEINDEX, FUNCTIONS_ATTRIBUTE, GROUP, GROUP_ELEMENT, HELP, HELP_ELEMENT, HELP_EVENT, HINT, HINT_ELEMENT, HINT_EVENT, INACTIVE_CASE_PSEUDOCLASS, INCLUDENAMESPACEPREFIXES_ATTRIBUTE, INCREMENTAL_ATTRIBUTE, INDENT_ATTRIBUTE, INDEX_ATTRIBUTE, INPUT, INPUT_ELEMENT, INPUTMODE_ATTRIBUTE, INRANGE_EVENT, INRANGE_PSEUDOCLASS, INSERT, INSERT_ELEMENT, INSERT_EVENT, INSTANCE, INSTANCE_ELEMENT, InstanceDocumentClassname, INVALID_DATATYPE_ERROR, INVALID_EVENT, INVALID_PSEUDOCLASS, ISVALID_ATTRIBUTE, ITEM, ITEM_ELEMENT, ITEMSET, ITEMSET_ELEMENT, LABEL, LEVEL_ATTRIBUTE, LINK_ERROR, LINK_EXCEPTION, LOAD, LOADURI_ELEMENT, MAXOCCURS_ATTRIBUTE, MEDIA_TYPE_ELEMENT, MEDIARENDERING_PSEUDOCLASS, MEDIATYPE, MEDIATYPE_ATTRIBUTE, MESSAGE, MESSAGE_ELEMENT, METHOD_ATTRIBUTE, MINOCCURS_ATTRIBUTE, MODEL_ATTRIBUTE, MODEL_CONSTRUCT_DONE_EVENT, MODEL_CONSTRUCT_EVENT, MODEL_DESTRUCT_EVENT, MODEL_ELEMENT, MODEL_ID_ATTRIBUTE, NAME_ATTRIBUTE, NAVINDEX_ATTRIBUTE, NEXT_EVENT, NODESET_ATTRIBUTE, NUMBER_ATTRIBUTE, OMIT_XML_DECLARATION_ATTRIBUTE, OPTIONAL_EVENT, ORIGIN_ATTRIBUTE, OUTOFRANGE_EVENT, OUTOFRANGE_PSEUDOCLASS, OUTPUT_ELEMENT, P3PTYPE_ATTRIBUTE, POSITION_ATTRIBUTE, PREVIOUS_EVENT, PSVIDocumentClassname, PSVISchemaPoolClassName, RANGE, RANGE_ELEMENT, READONLY_ATTRIBUTE, READONLY_EVENT, READONLY_PSEUDOCLASS, READWRITE_EVENT, READWRITE_PSEUDOCLASS, READY_EVENT, REBUILD_ELEMENT, REBUILD_EVENT, RECALCULATE_ELEMENT, RECALCULATE_EVENT, REF_ATTRIBUTE, REFRESH_ELEMENT, REFRESH_EVENT, RELEVANT_ATTRIBUTE, REPEAT, REPEAT_ATTRIBUTE, REPEAT_BIND_ATTRIBUTE, REPEAT_ELEMENT, REPEAT_ID_ATTRIBUTE, REPEAT_MODEL_ATTRIBUTE, REPEAT_NODESET_ATTRIBUTE, REPEAT_NUMBER_ATTRIBUTE, REPEAT_STARTINDEX_ATTRIBUTE, REPLACE_ALL, REPLACE_ATTRIBUTE, REPLACE_INSTANCE, REPLACE_NEW, REPLACE_NONE, REQUIRED_ATTRIBUTE, REQUIRED_EVENT, RESET, RESET_ELEMENT, RESET_EVENT, RESOURCE_ATTRIBUTE, RESOURCE_LINKING_ATTR, REVALIDATE, REVALIDATE_ELEMENT, REVALIDATE_EVENT, SCHEMA_ATTRIBUTE, SCHEMA_CONSTRAINTS_ERROR, SCHEMA_ELEMENT, SCROLL_FIRST_EVENT, SCROLL_LAST_EVENT, SECRET, SECRET_ELEMENT, SELECT, SELECT_BOOLEAN_ELEMENT, SELECT_EVENT, SELECT_MANY_ELEMENT, SELECT_ONE_ELEMENT, SELECT1, SELECTED_ATTRIBUTE, SELECTION_ATTRIBUTE, SEND, SEPARATOR_ATTRIBUTE, SET_FOCUS_ELEMENT, SET_INDEX_ELEMENT, SETFOCUS, SETINDEX, SETVALUE, SETVALUE_ELEMENT, SHOW_ATTR, SHOW_ATTRIBUTE, SHOW_NEW, SHOW_REPLACE, SRC_ATTRIBUTE, STANDALONE_ATTRIBUTE, START_ATTRIBUTE, STARTINDEX_ATTRIBUTE, STEP_ATTRIBUTE, SUBMISSION, SUBMISSION_ATTRIBUTE, SUBMIT, SUBMIT_DONE_EVENT, SUBMIT_ELEMENT, SUBMIT_ERROR, SUBMIT_EVENT, SUBMIT_INFO_ATTRIBUTE, SUBMIT_INFO_ELEMENT, SUBMIT_INSTANCE_ELEMENT, SUBMIT_STARTED_EVENT, SUBTREE_MODIFY_END, SUBTREE_MODIFY_START, SWITCH, SWITCH_ELEMENT, TARGET_ATTRIBUTE, TEXTAREA, TEXTAREA_ELEMENT, TOGGLE, TOGGLE_ELEMENT, TRAVERSAL_ERROR, TREE_ELEMENT, TRIGGER, TYPE_ATTRIBUTE, UI_INITIALIZE_EVENT, UPLOAD, UPLOAD_ELEMENT, VALID_EVENT, VALID_PSEUDOCLASS, VALUE, VALUE_ATTRIBUTE, VALUE_CHANGED_EVENT, VALUE_CHANGING_EVENT, VALUE_ELEMENT, VERSION_ATTRIBUTE, XercesPSVIClassName, XFORMS_NS, XFormsConfigurationPSVI, XHTML_NS, XSMILES_MESSAGE_SHOWN_EVENT
 
Constructor Summary
SubmissionElementImpl(XFormsElementHandler owner, java.lang.String ns, java.lang.String name)
           
 
Method Summary
 short acceptNode(org.w3c.dom.Node node)
          This method is from DOMWriterFilter and it will discard all non-relevant XForms instance nodes
protected  void addAttachment(java.io.ByteArrayOutputStream os, byte[] attachment, java.lang.String contentType, java.lang.String contentTransferEncoding, java.lang.String contentId, java.lang.String boundary)
           
protected  void addAttachment(java.io.ByteArrayOutputStream os, org.w3c.dom.Node n, short mode)
           
protected  void addAttachmentFormData(java.io.ByteArrayOutputStream os, byte[] attachment, java.lang.String contentType, java.lang.String name, java.lang.String boundary, java.lang.String filename)
           
protected  void finalizeSubmitAndReplace(XLink link, short replace, InstanceNode root, java.lang.String replaceinstance)
          this method does the submission using the browserwindow object
protected  void findAndAddAttachments(java.io.ByteArrayOutputStream os, InstanceNode root, short mode)
           
protected  java.lang.String getBoundary()
           
 java.lang.String getEncoding()
          Get the encoding of the SubmitInfo if specified.
 java.lang.String getId()
          The unique id.
 java.lang.String getIncludeNamespacePrefixes()
           
 boolean getIndent()
           
 InstanceElementImpl getInstance(java.lang.String id)
           
 java.lang.String getLocalFile()
           
 java.lang.String getMediaType()
          will return what is in the mediatype attribute, or "application/xml" as default if the attribute is not present
 java.lang.String getMethod()
           
 ModelElementImpl getModel()
          get this elements model (look for parents if model attribute not found)
 short getReplace()
           
protected  java.lang.String getReplaceInstance()
          X-Smiles extension to be able to replace any instance
 SchemaElementImpl getSchema()
           
 java.lang.String getSeparator()
           
protected  java.lang.String getStartID()
           
 java.lang.String getTarget()
           
protected  boolean getUserPermissionForFileWrite(java.io.File file, boolean exists)
           
 int getWhatToShow()
          This method is from DOMWriterFilter and it will discard all non-relevant XForms instance nodes
 void handleEvent(org.w3c.dom.events.Event evt)
          The DOM event handler
 void init()
          Initialize this element.
protected  void initXMLSerializer(XMLSerializerInterface serializer)
           
protected  java.lang.String serializeXML(org.w3c.dom.Node n)
           
 boolean shouldIrrelevantBeRemovedFromSubmission()
           
 void showError(java.lang.String title, java.lang.String explanation)
           
 void submit()
          Submit the form data according to form parameters
protected  void submitFormDataPost(java.net.URL url, InstanceNode root)
           
protected  void submitGet(java.net.URL url, InstanceNode root)
           
protected  void submitJMS(java.net.URL url, InstanceNode root)
           
protected  void submitLocalFile(java.lang.String localfile, java.lang.String action, java.net.URL url, InstanceNode root)
           
protected  void submitMultiPartPost(java.net.URL url, InstanceNode root)
           
protected  void submitPost(java.net.URL url, InstanceNode root)
           
protected  void submitPUT(java.net.URL url, InstanceNode root)
           
 void submitThread(java.lang.String method, java.lang.String localfile, java.lang.String action, java.net.URL url, InstanceNode n)
           
protected  void submitUrlEncodedPost(java.net.URL url, InstanceNode root)
           
 java.lang.String toString()
           
 
Methods inherited from class fi.hut.tml.xsmiles.mlfc.xforms.dom.ModelBoundElementImpl
checkBinding, createBinding, destroy, getBindingState, getBoundNodeset, getContextForDescendant, getContextFromAncestor, getContextNode, getParentBoundElement, getRef, getRefNode, getTextWithPrecedence, hasBindingAttributes, notifyParentBindingChanged, renewBinding, resetContextNode
 
Methods inherited from class fi.hut.tml.xsmiles.mlfc.xforms.dom.XFormsElementImpl
debugNode, dispatch, dispatch, dispatchActivateEvent, dispatchClickEvent, dispatchEvent, findFirstRelevantControl, getBrowser, getClassName, getComponentFactory, getModel, getModelId, getModelInScope, getSrc, getStyleAttrValue, getXMLDocument, handleXFormsException, initializeXMLEvents, isCSSLayoutDoc, moveNodes, printEvent, removeAllChildren, retrieveInstanceItem, retrieveResourceAsString, serializeNode, setClassName, setHandler, setId, setOwnerDoc
 
Methods inherited from class fi.hut.tml.xsmiles.dom.VisualElementImpl
addView, belongsToTree, getViews, insertBefore, isCurrentlyVisible, isFocusPoint, isPseudoClass, isVisibleByCSSProperties, notifyPseudoRemoved, removeAllViews, removeAttribute, removeChild, replaceChild, setAttribute, setStatus, styleChanged, updateViews
 
Methods inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl
addBinding, addUndistributedChild, clone, clonePseudoElements, cloneSubtree, debugNode, dispatchEventInMainThread, get, getApplyBindingSheets, getAuthorSheets, getChildNodes, getElementStatus, getOriginalClone, getPseudoClass, getResourceReferencer, getRuleNode, getStyle, getText, getText, getUndistributedChildNodes, getXblImplementations, hasBinding, hasStyle, initFinalFlattenedTree, initStyle, isInitedForReset, removeBinding, removeUndistributedChild, replaceNode, resetFinalFlattenedTree, resolveURI, searchElementWithId, searchElementWithId, setApplyBindingSheets, setAuthorSheets, setPseudoClass, setRuleNode, setStyle, updateStyle
 
Methods inherited from class org.apache.xerces.dom.ElementNSImpl
getBaseURI, getLocalName, getNamespaceURI, getPrefix, getTypeName, getTypeNamespace, setPrefix, setType, setValues
 
Methods inherited from class org.apache.xerces.dom.ElementImpl
cloneNode, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDefaultAttributes, getElementsByTagName, getElementsByTagNameNS, getNodeName, getNodeType, getSchemaTypeInfo, getTagName, getXercesAttribute, hasAttribute, hasAttributeNS, hasAttributes, isEqualNode, normalize, reconcileDefaultAttributes, removeAttributeNode, removeAttributeNS, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setReadOnly, setupDefaultAttributes, setXercesAttributeNode, synchronizeData
 
Methods inherited from class org.apache.xerces.dom.ParentNode
getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, hasChildNodes, item, setTextContent, synchronizeChildren
 
Methods inherited from class org.apache.xerces.dom.ChildNode
getNextSibling, getParentNode, getPreviousSibling
 
Methods inherited from class org.apache.xerces.dom.NodeImpl
addEventListener, appendChild, changed, changes, compareDocumentPosition, compareTreePosition, getContainer, getFeature, getNodeNumber, getNodeValue, getReadOnly, getUserData, getUserData, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setNodeValue, setUserData, setUserData
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 
Methods inherited from interface fi.hut.tml.xsmiles.dom.StylableElement
getRuleNode, getStyle, hasStyle, isPseudoClass, setRuleNode, setStyle
 
Methods inherited from interface fi.hut.tml.xsmiles.dom.VisualElement
getStyle
 
Methods inherited from interface fi.hut.tml.xsmiles.dom.PseudoClassController
getPseudoClass, setPseudoClass
 

Field Detail

submitThread

protected java.lang.Thread submitThread

properties

protected java.util.Hashtable properties

MODE_FORMDATA

protected static final short MODE_FORMDATA
See Also:
Constant Field Values

MODE_RELATED

protected static final short MODE_RELATED
See Also:
Constant Field Values

_boundary

protected java.lang.String _boundary

_start

protected java.lang.String _start
Constructor Detail

SubmissionElementImpl

public SubmissionElementImpl(XFormsElementHandler owner,
                             java.lang.String ns,
                             java.lang.String name)
Method Detail

getModel

public ModelElementImpl getModel()
Description copied from interface: ElementWithContext
get this elements model (look for parents if model attribute not found)

Specified by:
getModel in interface ElementWithContext
Overrides:
getModel in class ModelBoundElementImpl

getInstance

public InstanceElementImpl getInstance(java.lang.String id)

getSchema

public SchemaElementImpl getSchema()

getId

public java.lang.String getId()
Description copied from interface: XFormsElement
The unique id.

Specified by:
getId in interface XFormsElement
Overrides:
getId in class XFormsElementImpl

getIndent

public boolean getIndent()

getIncludeNamespacePrefixes

public java.lang.String getIncludeNamespacePrefixes()

getSeparator

public java.lang.String getSeparator()

getReplace

public short getReplace()

shouldIrrelevantBeRemovedFromSubmission

public boolean shouldIrrelevantBeRemovedFromSubmission()

getMethod

public java.lang.String getMethod()

getLocalFile

public java.lang.String getLocalFile()

getTarget

public java.lang.String getTarget()

getEncoding

public java.lang.String getEncoding()
Get the encoding of the SubmitInfo if specified.

Returns:
the value of the "encoding" attribute, (null if not found)

getMediaType

public java.lang.String getMediaType()
will return what is in the mediatype attribute, or "application/xml" as default if the attribute is not present


init

public void init()
Description copied from class: XSmilesElementImpl
Initialize this element.

Specified by:
init in interface XFormsElement
Overrides:
init in class XFormsElementImpl

submit

public void submit()
            throws XFormsSubmitException
Submit the form data according to form parameters
 Submitting the Form
 ------------------------------
 // DEBUGging forms:

 Method must be get when debugging

 1.
 

 -> save to temp2.xml and go to link.fo

 2.
 

 -> save to localfile temp2.xml and load it in the browser



 // These methods are not implemented yet:
 method="postxml" - post using post to action URL and retrieve next document
 method="jms" - send form using java messaging (what document to load in the browser?)

 Get and post are implemented for backwards compatibility (old cgi-bins and servlets)
 method="post" - post name-value pairs to action URL and retrieve next document
 method="get" - go to the URL "action", if URL is http, append fields as script variables after '?'
 

Throws:
XFormsSubmitException

submitThread

public void submitThread(java.lang.String method,
                         java.lang.String localfile,
                         java.lang.String action,
                         java.net.URL url,
                         InstanceNode n)
                  throws java.lang.Exception
Throws:
java.lang.Exception

submitPost

protected void submitPost(java.net.URL url,
                          InstanceNode root)
                   throws XFormsSubmitException
Throws:
XFormsSubmitException

submitUrlEncodedPost

protected void submitUrlEncodedPost(java.net.URL url,
                                    InstanceNode root)
                             throws XFormsSubmitException
Throws:
XFormsSubmitException

submitMultiPartPost

protected void submitMultiPartPost(java.net.URL url,
                                   InstanceNode root)
                            throws XFormsSubmitException
Throws:
XFormsSubmitException

submitFormDataPost

protected void submitFormDataPost(java.net.URL url,
                                  InstanceNode root)
                           throws XFormsSubmitException
Throws:
XFormsSubmitException

findAndAddAttachments

protected void findAndAddAttachments(java.io.ByteArrayOutputStream os,
                                     InstanceNode root,
                                     short mode)
                              throws java.io.IOException
Throws:
java.io.IOException

addAttachment

protected void addAttachment(java.io.ByteArrayOutputStream os,
                             org.w3c.dom.Node n,
                             short mode)
                      throws java.io.IOException
Throws:
java.io.IOException

addAttachment

protected void addAttachment(java.io.ByteArrayOutputStream os,
                             byte[] attachment,
                             java.lang.String contentType,
                             java.lang.String contentTransferEncoding,
                             java.lang.String contentId,
                             java.lang.String boundary)
                      throws java.io.IOException
Throws:
java.io.IOException

addAttachmentFormData

protected void addAttachmentFormData(java.io.ByteArrayOutputStream os,
                                     byte[] attachment,
                                     java.lang.String contentType,
                                     java.lang.String name,
                                     java.lang.String boundary,
                                     java.lang.String filename)
                              throws java.io.IOException
Throws:
java.io.IOException

getBoundary

protected java.lang.String getBoundary()

getStartID

protected java.lang.String getStartID()

getReplaceInstance

protected java.lang.String getReplaceInstance()
X-Smiles extension to be able to replace any instance


submitJMS

protected void submitJMS(java.net.URL url,
                         InstanceNode root)
                  throws XFormsSubmitException
Throws:
XFormsSubmitException

submitPUT

protected void submitPUT(java.net.URL url,
                         InstanceNode root)
                  throws XFormsSubmitException
Throws:
XFormsSubmitException

submitGet

protected void submitGet(java.net.URL url,
                         InstanceNode root)
                  throws java.lang.Exception
Throws:
java.lang.Exception

finalizeSubmitAndReplace

protected void finalizeSubmitAndReplace(XLink link,
                                        short replace,
                                        InstanceNode root,
                                        java.lang.String replaceinstance)
                                 throws java.lang.Exception
this method does the submission using the browserwindow object

Throws:
java.lang.Exception

submitLocalFile

protected void submitLocalFile(java.lang.String localfile,
                               java.lang.String action,
                               java.net.URL url,
                               InstanceNode root)
                        throws XFormsSubmitException
Throws:
XFormsSubmitException

initXMLSerializer

protected void initXMLSerializer(XMLSerializerInterface serializer)

getUserPermissionForFileWrite

protected boolean getUserPermissionForFileWrite(java.io.File file,
                                                boolean exists)

serializeXML

protected java.lang.String serializeXML(org.w3c.dom.Node n)
                                 throws XFormsSubmitException
Throws:
XFormsSubmitException

showError

public void showError(java.lang.String title,
                      java.lang.String explanation)

handleEvent

public void handleEvent(org.w3c.dom.events.Event evt)
The DOM event handler

Specified by:
handleEvent in interface org.w3c.dom.events.EventListener
Overrides:
handleEvent in class VisualElementImpl

getWhatToShow

public int getWhatToShow()
This method is from DOMWriterFilter and it will discard all non-relevant XForms instance nodes

Specified by:
getWhatToShow in interface org.w3c.dom.ls.DOMWriterFilter

acceptNode

public short acceptNode(org.w3c.dom.Node node)
This method is from DOMWriterFilter and it will discard all non-relevant XForms instance nodes

Specified by:
acceptNode in interface org.w3c.dom.traversal.NodeFilter

toString

public java.lang.String toString()
Specified by:
toString in interface Submission


X-Smiles 1.2