Package com.teamdev.jxbrowser.dom
Interface FormElement
- All Superinterfaces:
Element
,EventTarget
,Node
,SearchContext
An HTML DOM form element.
Provides access to the contained control elements and the attributes of the form element.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.teamdev.jxbrowser.dom.Element
Element.AlignTo
-
Method Summary
Modifier and TypeMethodDescriptionaction()
Returns the value of the action attribute of this form.controls()
Returns an immutable list of the form controls or an empty list if the form got no controls on it.method()
Returns the value of the method attribute of this form.name()
Returns the value of the name attribute of this form.void
reset()
Restores default values of the elements on the form.void
submit()
Submits the form represented by the element.Methods inherited from interface com.teamdev.jxbrowser.dom.Element
attributeNodes, attributes, attributeValue, blur, boundingClientRect, focus, hasAttribute, innerHtml, innerHtml, innerText, innerText, outerHtml, outerHtml, putAttribute, removeAttribute, scrollIntoView
Methods inherited from interface com.teamdev.jxbrowser.dom.event.EventTarget
addEventListener, dispatch, eventListeners, removeEventListener
Methods inherited from interface com.teamdev.jxbrowser.dom.Node
appendChild, children, click, close, compareDocumentPosition, document, evaluate, evaluate, insertChild, nextSibling, nodeName, nodeValue, nodeValue, parent, previousSibling, removeChild, replaceChild, textContent, textContent, type, xPath
Methods inherited from interface com.teamdev.jxbrowser.dom.SearchContext
findElementByClassName, findElementByCssSelector, findElementById, findElementByName, findElementByTagName, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByName, findElementsByTagName
-
Method Details
-
action
String action()Returns the value of the action attribute of this form. May return an empty string if there is no action attribute.- Throws:
ObjectClosedException
- when this instance is closed
-
name
String name()Returns the value of the name attribute of this form. This method can return an empty string if the name attribute does not exist.- Throws:
ObjectClosedException
- when this instance is closed
-
method
String method()Returns the value of the method attribute of this form. This method can return an empty string if the method attribute does not exist.- Throws:
ObjectClosedException
- when this instance is closed
-
reset
void reset()Restores default values of the elements on the form. It performs the same action as a reset button.- Throws:
ObjectClosedException
- when this instance is closed
-
submit
void submit()Submits the form represented by the element.- Throws:
ObjectClosedException
- when this instance is closed
-
controls
List<FormControlElement> controls()Returns an immutable list of the form controls or an empty list if the form got no controls on it.- Throws:
ObjectClosedException
- when this instance is closed
-