public class HtmlForm extends HtmlElement
HtmlElement.DisplayStyleDomElement.ChildElementsIteratorDomNode.ChildIterator, DomNode.DescendantElementsIterator<T extends DomNode>| Modifier and Type | Field and Description |
|---|---|
static String |
TAG_NAME
The HTML tag represented by this element.
|
TAB_INDEX_OUT_OF_BOUNDSATTRIBUTE_NOT_DEFINED, ATTRIBUTE_VALUE_EMPTYAS_TEXT_BLANK, AS_TEXT_BLOCK_SEPARATOR, AS_TEXT_NEW_LINE, AS_TEXT_TAB, PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZEDATTRIBUTE_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| Modifier and Type | Method and Description |
|---|---|
String |
getAcceptAttribute()
Returns the value of the attribute "accept".
|
String |
getAcceptCharsetAttribute()
Returns the value of the attribute "accept-charset".
|
String |
getActionAttribute()
Returns the value of the attribute "action".
|
HtmlButton |
getButtonByName(String name)
Returns the first
HtmlButton element in this form that has the specified name. |
List<HtmlButton> |
getButtonsByName(String name)
Returns all the
HtmlButton elements in this form that have the specified name. |
HtmlRadioButtonInput |
getCheckedRadioButton(String name)
Returns the first checked radio button with the specified name.
|
String |
getEnctypeAttribute()
Returns the value of the attribute "enctype".
|
<I extends HtmlInput> |
getInputByName(String name)
Returns the first input element which is a member of this form and has the specified name.
|
<I extends HtmlInput> |
getInputByValue(String value)
Returns the first input in this form with the specified value.
|
List<HtmlInput> |
getInputsByName(String name)
Returns all input elements which are members of this form and have the specified name.
|
List<HtmlInput> |
getInputsByValue(String value)
Returns all the inputs in this form with the specified value.
|
List<HtmlElement> |
getLostChildren()
Gets the form elements that may be submitted but that don't belong to the form's children
in the DOM due to incorrect HTML code.
|
String |
getMethodAttribute()
Returns the value of the attribute "method".
|
String |
getNameAttribute()
Returns the value of the attribute "name".
|
String |
getOnResetAttribute()
Returns the value of the attribute "onreset".
|
String |
getOnSubmitAttribute()
Returns the value of the attribute "onsubmit".
|
List<HtmlRadioButtonInput> |
getRadioButtonsByName(String name)
Returns all the
HtmlRadioButtonInput elements in this form that have the specified name. |
HtmlSelect |
getSelectByName(String name)
Returns the first
HtmlSelect element in this form that has the specified name. |
List<HtmlSelect> |
getSelectsByName(String name)
Returns all the
HtmlSelect elements in this form that have the specified name. |
String |
getTargetAttribute()
Returns the value of the attribute "target".
|
HtmlTextArea |
getTextAreaByName(String name)
Returns the first
HtmlTextArea element in this form that has the specified name. |
List<HtmlTextArea> |
getTextAreasByName(String name)
Returns all the
HtmlTextArea elements in this form that have the specified name. |
WebRequest |
getWebRequest(SubmittableElement submitElement)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
|
protected void |
preventDefault()
This method is called if the current fired event is canceled by preventDefault() in FireFox,
or by returning false in Internet Explorer.
|
Page |
reset()
Resets this form to its initial values, returning the page contained by this form's window after the
reset.
|
void |
setActionAttribute(String action)
Sets the value of the attribute "action".
|
void |
setEnctypeAttribute(String encoding)
Sets the value of the attribute "enctype".
|
void |
setMethodAttribute(String method)
Sets the value of the attribute "method".
|
void |
setNameAttribute(String name)
Sets the value of the attribute "name".
|
void |
setTargetAttribute(String target)
Sets the value of the attribute "target".
|
acceptChar, addHtmlAttributeChangeListener, appendChildIfNoneExists, checkChildHierarchy, doType, doType, fireHtmlAttributeAdded, fireHtmlAttributeRemoved, fireHtmlAttributeReplaced, getCanonicalXPath, getDefaultStyleDisplay, getElementsByAttribute, getEnclosingElement, getEnclosingForm, getEnclosingFormOrDie, getHtmlElementsByTagName, getHtmlElementsByTagNames, getLangAttribute, getNodeName, getOnClickAttribute, getOnDblClickAttribute, getOneHtmlElementByAttribute, getOnKeyDownAttribute, getOnKeyPressAttribute, getOnKeyUpAttribute, getOnMouseDownAttribute, getOnMouseMoveAttribute, getOnMouseOutAttribute, getOnMouseOverAttribute, getOnMouseUpAttribute, getSrcAttributeNormalized, getTabIndex, getTextDirectionAttribute, getXmlLangAttribute, hasEventHandlers, isAttributeCaseSensitive, isDisplayed, isSubmittableByEnter, removeAttribute, removeChild, removeEventHandler, removeHtmlAttributeChangeListener, setAttributeNode, setAttributeNS, setEventHandler, setEventHandler, setId, type, type, type, type, type, type, type, typeDoneblur, click, click, click, cloneNode, dblClick, dblClick, doClickFireChangeEvent, doClickFireClickEvent, doClickStateUpdate, fireEvent, fireEvent, focus, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getAttributesMap, getChildElementCount, getChildElements, getElementsByTagName, getElementsByTagNameNS, getEventTargetElement, getFirstElementChild, getId, getLastElementChild, getNextElementSibling, getNodeType, getPreviousElementSibling, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, hasAttributes, isEmptyXmlTagExpanded, isStateUpdateFirst, mouseDown, mouseDown, mouseMove, mouseMove, mouseOut, mouseOut, mouseOver, mouseOver, mouseUp, mouseUp, namespaces, printOpeningTagContentAsXml, printXml, propagateClickStateUpdateToParent, removeAttributeNode, removeAttributeNS, removeFocus, rightClick, rightClick, setAttribute, setAttributeNodeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, toStringgetLocalName, getNamespaceURI, getPrefix, getQualifiedName, processImportNode, setPrefixaddCharacterDataChangeListener, addDomChangeListener, appendChild, asText, asXml, compareDocumentPosition, detach, fireCharacterDataChanged, fireNodeAdded, fireNodeDeleted, getAncestors, getBaseURI, getByXPath, getByXPath, getChildNodes, getChildren, getDescendants, getDomElementDescendants, getEndColumnNumber, getEndLineNumber, getFeature, getFirstByXPath, getFirstByXPath, getFirstChild, getHtmlElementDescendants, getHtmlPageOrNull, getIndex, getLastChild, getNextSibling, getNodeValue, getOwnerDocument, getPage, getParentNode, getPreviousSibling, getReadyState, getScriptObject, getStartColumnNumber, getStartLineNumber, getTextContent, getUserData, hasChildNodes, hasFeature, insertBefore, insertBefore, isAncestorOf, isAncestorOfAny, isBlock, isDefaultNamespace, isDescendant, isDirectlyAttachedToPage, isEqualNode, isSameNode, isSupported, isTrimmedText, lookupNamespaceURI, lookupPrefix, mayBeDisplayed, normalize, notifyIncorrectness, onAddedToDocumentFragment, onAddedToPage, onAllChildrenAddedToPage, printChildrenAsXml, querySelector, querySelectorAll, remove, removeAllChildren, removeCharacterDataChangeListener, removeChild, removeDomChangeListener, replace, replaceChild, setNextSibling, setNodeValue, setParentNode, setPreviousSibling, setReadyState, setScriptObject, setTextContent, setUserDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitappendChild, compareDocumentPosition, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserDatapublic static final String TAG_NAME
public WebRequest getWebRequest(SubmittableElement submitElement)
submitElement - the element that caused the submit to occurpublic Page reset()
public List<HtmlInput> getInputsByName(String name)
name - the input name to search forpublic final <I extends HtmlInput> I getInputByName(String name) throws ElementNotFoundException
I - the input typename - the input name to search forElementNotFoundException - if there is not input in this form with the specified namepublic List<HtmlSelect> getSelectsByName(String name)
HtmlSelect elements in this form that have the specified name.name - the name to search forHtmlSelect elements in this form that have the specified namepublic HtmlSelect getSelectByName(String name) throws ElementNotFoundException
HtmlSelect element in this form that has the specified name.name - the name to search forHtmlSelect element in this form that has the specified nameElementNotFoundException - if this form does not contain a HtmlSelect
element with the specified namepublic List<HtmlButton> getButtonsByName(String name)
HtmlButton elements in this form that have the specified name.name - the name to search forHtmlButton elements in this form that have the specified namepublic HtmlButton getButtonByName(String name) throws ElementNotFoundException
HtmlButton element in this form that has the specified name.name - the name to search forHtmlButton element in this form that has the specified nameElementNotFoundException - if this form does not contain a HtmlButton
element with the specified namepublic List<HtmlTextArea> getTextAreasByName(String name)
HtmlTextArea elements in this form that have the specified name.name - the name to search forHtmlTextArea elements in this form that have the specified namepublic HtmlTextArea getTextAreaByName(String name) throws ElementNotFoundException
HtmlTextArea element in this form that has the specified name.name - the name to search forHtmlTextArea element in this form that has the specified nameElementNotFoundException - if this form does not contain a HtmlTextArea
element with the specified namepublic List<HtmlRadioButtonInput> getRadioButtonsByName(String name)
HtmlRadioButtonInput elements in this form that have the specified name.name - the name to search forHtmlRadioButtonInput elements in this form that have the specified namepublic HtmlRadioButtonInput getCheckedRadioButton(String name)
name - the name of the radio buttonpublic final String getActionAttribute()
public final void setActionAttribute(String action)
action - the value of the attribute "action"public final String getMethodAttribute()
public final void setMethodAttribute(String method)
method - the value of the attribute "method"public final String getNameAttribute()
public final void setNameAttribute(String name)
name - the value of the attribute "name"public final String getEnctypeAttribute()
public final void setEnctypeAttribute(String encoding)
encoding - the value of the attribute "enctype"public final String getOnSubmitAttribute()
public final String getOnResetAttribute()
public final String getAcceptAttribute()
public final String getAcceptCharsetAttribute()
public final String getTargetAttribute()
public final void setTargetAttribute(String target)
target - the value of the attribute "target"public <I extends HtmlInput> I getInputByValue(String value) throws ElementNotFoundException
I - the input typevalue - the value to search forElementNotFoundException - if this form does not contain any inputs with the specified valuepublic List<HtmlInput> getInputsByValue(String value)
value - the value to search forpublic List<HtmlElement> getLostChildren()
protected void preventDefault()
preventDefault in class DomElementCopyright © 2002–2015 Gargoyle Software Inc.. All rights reserved.