Package org.lobobrowser.html.domimpl
Class HTMLFormElementImpl
- java.lang.Object
-
- 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
Constructors Constructor Description HTMLFormElementImpl()HTMLFormElementImpl(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAcceptCharset()List of character sets supported by the server.java.lang.StringgetAction()Server-side form handler.HTMLCollectiongetElements()Returns a collection of all form control elements in the form.java.lang.StringgetEnctype()The content type of the submitted form, generally "application/x-www-form-urlencoded".intgetLength()The number of form controls in the form.java.lang.StringgetMethod()HTTP method [IETF RFC 2616] used to submit form.java.lang.StringgetName()Names the form.org.mozilla.javascript.FunctiongetOnsubmit()java.lang.StringgetTarget()Frame to render the resource in.java.lang.Objectitem(int index)java.lang.ObjectnamedItem(java.lang.String name)voidreset()Restores a form element's default values.voidsetAcceptCharset(java.lang.String acceptCharset)List of character sets supported by the server.voidsetAction(java.lang.String action)Server-side form handler.voidsetEnctype(java.lang.String enctype)The content type of the submitted form, generally "application/x-www-form-urlencoded".voidsetMethod(java.lang.String method)HTTP method [IETF RFC 2616] used to submit form.voidsetName(java.lang.String name)Names the form.voidsetOnsubmit(org.mozilla.javascript.Function value)voidsetTarget(java.lang.String target)Frame to render the resource in.voidsubmit()Submits the form.voidsubmit(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, createDefaultStyleSheet, createRenderState, findStyleDeclarations, forgetLocalStyle, forgetStyle, getAncestor, getAncestorForJavaClass, getAncestorWithClass, getAncestorWithId, getAttributeAsBoolean, getAttributeAsInt, getCharset, getClassName, getComputedStyle, getCssInputSourceForDecl, getCurrentStyle, getDocumentBaseURI, getFormInputs, getOffsetHeight, getOffsetLeft, getOffsetTop, getOffsetWidth, getOuterHTML, getParent, getParentStyle, getParentWithClass, getParentWithId, getPreceedingSibling, getPreceedingSiblingElement, getPreceedingSiblingWithClass, getPreceedingSiblingWithId, getPseudoNames, getStyle, informInvalid, informInvalidAttibute, setCharset, setClassName, setCurrentStyle, setInnerHTML, setMouseOver, setStyle, toString, warn, warn
-
Methods inherited from class org.lobobrowser.html.domimpl.ElementImpl
createSimilarNode, equalAttributes, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDir, getElementsByTagName, getElementsByTagNameNS, getId, getLang, getLocalName, getNodeName, getNodeType, getNodeValue, getRawInnerText, getSchemaTypeInfo, getTagName, getTitle, hasAttribute, hasAttributeNS, hasAttributes, htmlEncodeChildText, 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, appendInnerTextImpl, cloneNode, compareDocumentPosition, findUINode, forgetRenderState, getAlignmentX, getAlignmentY, getBaseURI, getChildNodes, getChildren, getChildrenArray, getDescendents, getDocumentItem, getDocumentURL, getFeature, getFirstChild, getFullURL, getHtmlRendererContext, getInnerHTML, getInnerText, getLastChild, getNamespaceURI, getNextSibling, getNodeList, getOwnerDocument, getParentModelNode, getParentNode, getParentRenderState, getPrefix, getPreviousSibling, getRenderState, getTextContent, getUINode, getUserAgentContext, getUserData, hasChildNodes, informDocumentInvalid, 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.lobobrowser.html.style.CSS2PropertiesContext
informLayoutInvalid, informLookInvalid, informPositionInvalid, informSizeInvalid
-
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.html2.HTMLElement
getClassName, getDir, getId, getLang, getTitle, setClassName, setDir, setId, setLang, setTitle
-
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
-
-
-
-
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:HTMLFormElementReturns a collection of all form control elements in the form.- Specified by:
getElementsin interfaceHTMLFormElement
-
getLength
public int getLength()
Description copied from interface:HTMLFormElementThe number of form controls in the form.- Specified by:
getLengthin interfaceHTMLFormElement
-
getName
public java.lang.String getName()
Description copied from interface:HTMLFormElementNames the form.- Specified by:
getNamein interfaceHTMLFormElement
-
setName
public void setName(java.lang.String name)
Description copied from interface:HTMLFormElementNames the form.- Specified by:
setNamein interfaceHTMLFormElement
-
getAcceptCharset
public java.lang.String getAcceptCharset()
Description copied from interface:HTMLFormElementList of character sets supported by the server. See the accept-charset attribute definition in HTML 4.01.- Specified by:
getAcceptCharsetin interfaceHTMLFormElement
-
setAcceptCharset
public void setAcceptCharset(java.lang.String acceptCharset)
Description copied from interface:HTMLFormElementList of character sets supported by the server. See the accept-charset attribute definition in HTML 4.01.- Specified by:
setAcceptCharsetin interfaceHTMLFormElement
-
getAction
public java.lang.String getAction()
Description copied from interface:HTMLFormElementServer-side form handler. See the action attribute definition in HTML 4.01.- Specified by:
getActionin interfaceHTMLFormElement
-
setAction
public void setAction(java.lang.String action)
Description copied from interface:HTMLFormElementServer-side form handler. See the action attribute definition in HTML 4.01.- Specified by:
setActionin interfaceHTMLFormElement
-
getEnctype
public java.lang.String getEnctype()
Description copied from interface:HTMLFormElementThe 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:
getEnctypein interfaceHTMLFormElement
-
setEnctype
public void setEnctype(java.lang.String enctype)
Description copied from interface:HTMLFormElementThe 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:
setEnctypein interfaceHTMLFormElement
-
getMethod
public java.lang.String getMethod()
Description copied from interface:HTMLFormElementHTTP method [IETF RFC 2616] used to submit form. See the method attribute definition in HTML 4.01.- Specified by:
getMethodin interfaceHTMLFormElement
-
setMethod
public void setMethod(java.lang.String method)
Description copied from interface:HTMLFormElementHTTP method [IETF RFC 2616] used to submit form. See the method attribute definition in HTML 4.01.- Specified by:
setMethodin interfaceHTMLFormElement
-
getTarget
public java.lang.String getTarget()
Description copied from interface:HTMLFormElementFrame to render the resource in. See the target attribute definition in HTML 4.01.- Specified by:
getTargetin interfaceHTMLFormElement
-
setTarget
public void setTarget(java.lang.String target)
Description copied from interface:HTMLFormElementFrame to render the resource in. See the target attribute definition in HTML 4.01.- Specified by:
setTargetin interfaceHTMLFormElement
-
submit
public void submit()
Description copied from interface:HTMLFormElementSubmits the form. It performs the same action as a submit button.- Specified by:
submitin interfaceHTMLFormElement
-
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:HTMLFormElementRestores a form element's default values. It performs the same action as a reset button.- Specified by:
resetin interfaceHTMLFormElement
-
-