org.lobobrowser.html.domimpl
Class HTMLFormElementImpl

java.lang.Object
  extended by org.lobobrowser.js.AbstractScriptableDelegate
      extended by org.lobobrowser.html.domimpl.NodeImpl
          extended by org.lobobrowser.html.domimpl.ElementImpl
              extended by org.lobobrowser.html.domimpl.HTMLElementImpl
                  extended by org.lobobrowser.html.domimpl.HTMLAbstractUIElement
                      extended by org.lobobrowser.html.domimpl.HTMLFormElementImpl
All Implemented Interfaces:
ModelNode, CSS2PropertiesContext, ScriptableDelegate, org.w3c.dom.Element, HTMLElement, HTMLFormElement, org.w3c.dom.Node

public class HTMLFormElementImpl
extends HTMLAbstractUIElement
implements HTMLFormElement


Field Summary
 
Fields inherited from class org.lobobrowser.html.domimpl.ElementImpl
attributes
 
Fields inherited from class org.lobobrowser.html.domimpl.NodeImpl
document, logger, nodeList, notificationsSuspended, parentNode, treeLock, uiNode
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
HTMLFormElementImpl()
           
HTMLFormElementImpl(java.lang.String name)
           
 
Method Summary
 java.lang.String getAcceptCharset()
          List of character sets supported by the server.
 java.lang.String getAction()
          Server-side form handler.
 HTMLCollection getElements()
          Returns a collection of all form control elements in the form.
 java.lang.String getEnctype()
          The content type of the submitted form, generally "application/x-www-form-urlencoded".
 int getLength()
          The number of form controls in the form.
 java.lang.String getMethod()
          HTTP method [IETF RFC 2616] used to submit form.
 java.lang.String getName()
          Names the form.
 org.mozilla.javascript.Function getOnsubmit()
           
 java.lang.String getTarget()
          Frame to render the resource in.
 java.lang.Object item(int index)
           
 java.lang.Object namedItem(java.lang.String name)
           
 void reset()
          Restores a form element's default values.
 void setAcceptCharset(java.lang.String acceptCharset)
          List of character sets supported by the server.
 void setAction(java.lang.String action)
          Server-side form handler.
 void setEnctype(java.lang.String enctype)
          The content type of the submitted form, generally "application/x-www-form-urlencoded".
 void setMethod(java.lang.String method)
          HTTP method [IETF RFC 2616] used to submit form.
 void setName(java.lang.String name)
          Names the form.
 void setOnsubmit(org.mozilla.javascript.Function value)
           
 void setTarget(java.lang.String target)
          Frame to render the resource in.
 void submit()
          Submits the form.
 void submit(FormInput[] extraFormInputs)
          This method should be called when form submission is done by a submit button.
 
Methods inherited from class org.lobobrowser.html.domimpl.HTMLAbstractUIElement
assignAttributeField, blur, focus, getEventFunction, getOnblur, getOnclick, getOncontextmenu, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, setOnblur, setOnclick, setOncontextmenu, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup
 
Methods inherited from class org.lobobrowser.html.domimpl.HTMLElementImpl
addStyleSheetDeclarations, appendOuterHTMLImpl, createRenderState, findStyleDeclarations, forgetLocalStyle, forgetStyle, getAncestor, getAncestorForJavaClass, getAncestorWithClass, getAncestorWithId, getAttributeAsBoolean, getAttributeAsInt, getCharset, getClassName, getComputedStyle, getCssInputSourceForDecl, getCurrentStyle, getDocumentBaseURI, getFormInputs, getOffsetHeight, getOffsetLeft, getOffsetTop, getOffsetWidth, getOuterHTML, getParentStyle, getPseudoNames, getStyle, informInvalid, informInvalidAttibute, setCharset, setClassName, setCurrentStyle, setInnerHTML, setMouseOver, setStyle, toString, warn, warn
 
Methods inherited from class org.lobobrowser.html.domimpl.ElementImpl
appendInnerTextImpl, createSimilarNode, equalAttributes, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDir, getElementsByTagName, getElementsByTagNameNS, getId, getInnerText, getLang, getLocalName, getNodeName, getNodeType, getNodeValue, getRawInnerText, getSchemaTypeInfo, getTagName, getTitle, hasAttribute, hasAttributeNS, hasAttributes, isTagName, normalizeAttributeName, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeImpl, setAttributeNode, setAttributeNodeNS, setAttributeNS, setDir, setId, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setInnerText, setLang, setNodeValue, setTitle
 
Methods inherited from class org.lobobrowser.html.domimpl.NodeImpl
appendChild, appendInnerHTMLImpl, cloneNode, compareDocumentPosition, findUINode, forgetRenderState, getAlignmentX, getAlignmentY, getBaseURI, getChildNodes, getChildren, getChildrenArray, getDescendents, getDocumentItem, getDocumentURL, getFeature, getFirstChild, getFullURL, getHtmlRendererContext, getInnerHTML, getLastChild, getNamespaceURI, getNextSibling, getNodeList, getOwnerDocument, getParentModelNode, getParentNode, getParentRenderState, getPrefix, getPreviousSibling, getRenderState, getTextContent, getUINode, getUserAgentContext, getUserData, hasChildNodes, informExternalScriptLoading, informLayoutInvalid, informLookInvalid, informNodeLoaded, informPositionInvalid, informSizeInvalid, informStructureInvalid, insertAfter, insertAt, insertBefore, isDefaultNamespace, isEqualNode, isEqualOrDescendentOf, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeAllChildren, removeAllChildrenImpl, removeChild, removeChildAt, removeChildren, removeChildrenImpl, replaceAdjacentTextNodes, replaceAdjacentTextNodes, replaceChild, setDocumentItem, setPrefix, setTextContent, setUINode, setUserData
 
Methods inherited from class org.lobobrowser.js.AbstractScriptableDelegate
getScriptable, setScriptable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.html2.HTMLElement
getClassName, getDir, getId, getLang, getTitle, setClassName, setDir, setId, setLang, setTitle
 
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 
Methods inherited from interface org.lobobrowser.html.style.CSS2PropertiesContext
informLayoutInvalid, informLookInvalid, informPositionInvalid, informSizeInvalid
 

Constructor Detail

HTMLFormElementImpl

public HTMLFormElementImpl(java.lang.String name)

HTMLFormElementImpl

public HTMLFormElementImpl()
Method Detail

namedItem

public java.lang.Object namedItem(java.lang.String name)

item

public java.lang.Object item(int index)

getElements

public HTMLCollection getElements()
Description copied from interface: HTMLFormElement
Returns a collection of all form control elements in the form.

Specified by:
getElements in interface HTMLFormElement

getLength

public int getLength()
Description copied from interface: HTMLFormElement
The number of form controls in the form.

Specified by:
getLength in interface HTMLFormElement

getName

public java.lang.String getName()
Description copied from interface: HTMLFormElement
Names the form.

Specified by:
getName in interface HTMLFormElement

setName

public void setName(java.lang.String name)
Description copied from interface: HTMLFormElement
Names the form.

Specified by:
setName in interface HTMLFormElement

getAcceptCharset

public java.lang.String getAcceptCharset()
Description copied from interface: HTMLFormElement
List of character sets supported by the server. See the accept-charset attribute definition in HTML 4.01.

Specified by:
getAcceptCharset in interface HTMLFormElement

setAcceptCharset

public void setAcceptCharset(java.lang.String acceptCharset)
Description copied from interface: HTMLFormElement
List of character sets supported by the server. See the accept-charset attribute definition in HTML 4.01.

Specified by:
setAcceptCharset in interface HTMLFormElement

getAction

public java.lang.String getAction()
Description copied from interface: HTMLFormElement
Server-side form handler. See the action attribute definition in HTML 4.01.

Specified by:
getAction in interface HTMLFormElement

setAction

public void setAction(java.lang.String action)
Description copied from interface: HTMLFormElement
Server-side form handler. See the action attribute definition in HTML 4.01.

Specified by:
setAction in interface HTMLFormElement

getEnctype

public java.lang.String getEnctype()
Description copied from interface: HTMLFormElement
The content type of the submitted form, generally "application/x-www-form-urlencoded". See the enctype attribute definition in HTML 4.01. The onsubmit even handler is not guaranteed to be triggered when invoking this method. The behavior is inconsistent for historical reasons and authors should not rely on a particular one.

Specified by:
getEnctype in interface HTMLFormElement

setEnctype

public void setEnctype(java.lang.String enctype)
Description copied from interface: HTMLFormElement
The content type of the submitted form, generally "application/x-www-form-urlencoded". See the enctype attribute definition in HTML 4.01. The onsubmit even handler is not guaranteed to be triggered when invoking this method. The behavior is inconsistent for historical reasons and authors should not rely on a particular one.

Specified by:
setEnctype in interface HTMLFormElement

getMethod

public java.lang.String getMethod()
Description copied from interface: HTMLFormElement
HTTP method [IETF RFC 2616] used to submit form. See the method attribute definition in HTML 4.01.

Specified by:
getMethod in interface HTMLFormElement

setMethod

public void setMethod(java.lang.String method)
Description copied from interface: HTMLFormElement
HTTP method [IETF RFC 2616] used to submit form. See the method attribute definition in HTML 4.01.

Specified by:
setMethod in interface HTMLFormElement

getTarget

public java.lang.String getTarget()
Description copied from interface: HTMLFormElement
Frame to render the resource in. See the target attribute definition in HTML 4.01.

Specified by:
getTarget in interface HTMLFormElement

setTarget

public void setTarget(java.lang.String target)
Description copied from interface: HTMLFormElement
Frame to render the resource in. See the target attribute definition in HTML 4.01.

Specified by:
setTarget in interface HTMLFormElement

submit

public void submit()
Description copied from interface: HTMLFormElement
Submits the form. It performs the same action as a submit button.

Specified by:
submit in interface HTMLFormElement

setOnsubmit

public void setOnsubmit(org.mozilla.javascript.Function value)

getOnsubmit

public org.mozilla.javascript.Function getOnsubmit()

submit

public final void submit(FormInput[] extraFormInputs)
This method should be called when form submission is done by a submit button.

Parameters:
extraFormInputs - Any additional form inputs that need to be submitted, e.g. the submit button parameter.

reset

public void reset()
Description copied from interface: HTMLFormElement
Restores a form element's default values. It performs the same action as a reset button.

Specified by:
reset in interface HTMLFormElement