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.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, 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:HTMLFormElement
Returns a collection of all form control elements in the form.- Specified by:
getElements
in interfaceHTMLFormElement
-
getLength
public int getLength()
Description copied from interface:HTMLFormElement
The number of form controls in the form.- Specified by:
getLength
in interfaceHTMLFormElement
-
getName
public java.lang.String getName()
Description copied from interface:HTMLFormElement
Names the form.- Specified by:
getName
in interfaceHTMLFormElement
-
setName
public void setName(java.lang.String name)
Description copied from interface:HTMLFormElement
Names the form.- Specified by:
setName
in interfaceHTMLFormElement
-
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 interfaceHTMLFormElement
-
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 interfaceHTMLFormElement
-
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 interfaceHTMLFormElement
-
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 interfaceHTMLFormElement
-
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 interfaceHTMLFormElement
-
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 interfaceHTMLFormElement
-
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 interfaceHTMLFormElement
-
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 interfaceHTMLFormElement
-
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 interfaceHTMLFormElement
-
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 interfaceHTMLFormElement
-
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 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:HTMLFormElement
Restores a form element's default values. It performs the same action as a reset button.- Specified by:
reset
in interfaceHTMLFormElement
-
-