org.lobobrowser.html.domimpl

Class HTMLFormElementImpl

Implemented Interfaces:
Element, CSS2PropertiesContext, HTMLElement, HTMLFormElement, Node, ModelNode, ScriptableDelegate

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

Constructor Summary

HTMLFormElementImpl()
HTMLFormElementImpl(String name)

Method Summary

String
getAcceptCharset()
List of character sets supported by the server.
String
getAction()
Server-side form handler.
HTMLCollection
getElements()
Returns a collection of all form control elements in the form.
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.
String
getMethod()
HTTP method [IETF RFC 2616] used to submit form.
String
getName()
Names the form.
Function
getOnsubmit()
String
getTarget()
Frame to render the resource in.
Object
item(int index)
Object
namedItem(String name)
void
reset()
Restores a form element's default values.
void
setAcceptCharset(String acceptCharset)
List of character sets supported by the server.
void
setAction(String action)
Server-side form handler.
void
setEnctype(String enctype)
The content type of the submitted form, generally "application/x-www-form-urlencoded".
void
setMethod(String method)
HTTP method [IETF RFC 2616] used to submit form.
void
setName(String name)
Names the form.
void
setOnsubmit(Function value)
void
setTarget(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, assignAttributeField, 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, informLayoutInvalid, setCharset, setClassName, setCurrentStyle, setInnerHTML, setMouseOver, setStyle, toString, warn, warn

Methods inherited from class org.lobobrowser.html.domimpl.ElementImpl

appendInnerTextImpl, assignAttributeField, createSimilarNode, equalAttributes, getAttribute, getAttributeNS, getAttributeNode, getAttributeNodeNS, getAttributes, getDir, getElementsByTagName, getElementsByTagNameNS, getId, getInnerText, getLang, getLocalName, getNodeName, getNodeType, getNodeValue, getRawInnerText, getSchemaTypeInfo, getTagName, getTitle, hasAttribute, hasAttributeNS, hasAttributes, isTagName, normalizeAttributeName, removeAttribute, removeAttributeNS, removeAttributeNode, setAttribute, setAttributeImpl, setAttributeNS, setAttributeNode, setAttributeNodeNS, setDir, setId, setIdAttribute, setIdAttributeNS, setIdAttributeNode, setInnerText, setLang, setNodeValue, setTitle, toString

Methods inherited from class org.lobobrowser.html.domimpl.NodeImpl

appendChild, appendInnerHTMLImpl, cloneNode, compareDocumentPosition, createRenderState, createSimilarNode, equalAttributes, findUINode, forgetRenderState, getAlignmentX, getAlignmentY, getAttributes, getBaseURI, getChildNodes, getChildren, getChildrenArray, getDescendents, getDocumentItem, getDocumentURL, getFeature, getFirstChild, getFullURL, getHtmlRendererContext, getInnerHTML, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeList, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentModelNode, getParentNode, getParentRenderState, getPrefix, getPreviousSibling, getRenderState, getTextContent, getUINode, getUserAgentContext, getUserData, hasAttributes, hasChildNodes, informExternalScriptLoading, informInvalid, 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, setNodeValue, setPrefix, setTextContent, setUINode, setUserData, toString, warn, warn

Methods inherited from class org.lobobrowser.js.AbstractScriptableDelegate

getScriptable, setScriptable

Constructor Details

HTMLFormElementImpl

public HTMLFormElementImpl()

HTMLFormElementImpl

public HTMLFormElementImpl(String name)

Method Details

getAcceptCharset

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

getAction

public String getAction()
Server-side form handler. See the action attribute definition in HTML 4.01.
Specified by:
getAction in interface HTMLFormElement

getElements

public HTMLCollection getElements()
Returns a collection of all form control elements in the form.
Specified by:
getElements in interface HTMLFormElement

getEnctype

public String getEnctype()
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

getLength

public int getLength()
The number of form controls in the form.
Specified by:
getLength in interface HTMLFormElement

getMethod

public String getMethod()
HTTP method [IETF RFC 2616] used to submit form. See the method attribute definition in HTML 4.01.
Specified by:
getMethod in interface HTMLFormElement

getName

public String getName()
Names the form.
Specified by:
getName in interface HTMLFormElement

getOnsubmit

public Function getOnsubmit()

getTarget

public String getTarget()
Frame to render the resource in. See the target attribute definition in HTML 4.01.
Specified by:
getTarget in interface HTMLFormElement

item

public Object item(int index)

namedItem

public Object namedItem(String name)

reset

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

setAcceptCharset

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

setAction

public void setAction(String action)
Server-side form handler. See the action attribute definition in HTML 4.01.
Specified by:
setAction in interface HTMLFormElement

setEnctype

public void setEnctype(String enctype)
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

setMethod

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

setName

public void setName(String name)
Names the form.
Specified by:
setName in interface HTMLFormElement

setOnsubmit

public void setOnsubmit(Function value)

setTarget

public void setTarget(String target)
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()
Submits the form. It performs the same action as a submit button.
Specified by:
submit in interface HTMLFormElement

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.