|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.htmlunit.html.DomNode
com.gargoylesoftware.htmlunit.html.DomNamespaceNode
com.gargoylesoftware.htmlunit.html.DomElement
com.gargoylesoftware.htmlunit.html.HtmlElement
com.gargoylesoftware.htmlunit.html.HtmlForm
public class HtmlForm
Wrapper for the HTML element "form".
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement |
---|
HtmlElement.ChildElementsIterator |
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.html.DomNode |
---|
DomNode.ChildIterator, DomNode.DescendantElementsIterator<T extends DomNode> |
Field Summary | |
---|---|
static String |
TAG_NAME
The HTML tag represented by this element. |
Fields inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement |
---|
TAB_INDEX_OUT_OF_BOUNDS |
Fields inherited from class com.gargoylesoftware.htmlunit.html.DomElement |
---|
ATTRIBUTE_NOT_DEFINED, ATTRIBUTE_VALUE_EMPTY |
Fields inherited from class com.gargoylesoftware.htmlunit.html.DomNode |
---|
AS_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_UNINITIALIZED |
Method Summary | ||
---|---|---|
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". |
|
|
getInputByName(String name)
Returns the first input element which is a member of this form and has the specified name. |
|
|
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. Gets the request for a submission of this form with the specified SubmittableElement. |
|
WebRequest |
getWebRequestSettings(SubmittableElement submitElement)
Deprecated. as of 2.8, please use getWebRequest(SubmittableElement) instead |
|
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". |
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomElement |
---|
cloneNode, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getAttributesMap, getElementsByTagName, getElementsByTagNameNS, getNodeType, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, hasAttributes, isEmptyXmlTagExpanded, namespaces, printOpeningTagContentAsXml, printXml, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS |
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNamespaceNode |
---|
getLocalName, getNamespaceURI, getPrefix, getQualifiedName, setPrefix |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
---|
appendChild, 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, setUserData |
Field Detail |
---|
public static final String TAG_NAME
Method Detail |
---|
@Deprecated public WebRequest getWebRequestSettings(SubmittableElement submitElement)
getWebRequest(SubmittableElement)
instead
submitElement
- the element that caused the submit to occur
public WebRequest getWebRequest(SubmittableElement submitElement)
submitElement
- the element that caused the submit to occur
public Page reset()
public List<HtmlInput> getInputsByName(String name)
name
- the input name to search for
public final <I extends HtmlInput> I getInputByName(String name) throws ElementNotFoundException
I
- the input typename
- the input name to search for
ElementNotFoundException
- 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 for
HtmlSelect
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 for
HtmlSelect
element in this form that has the specified name
ElementNotFoundException
- 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 for
HtmlButton
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 for
HtmlButton
element in this form that has the specified name
ElementNotFoundException
- 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 for
HtmlTextArea
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 for
HtmlTextArea
element in this form that has the specified name
ElementNotFoundException
- 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 for
HtmlRadioButtonInput
elements in this form that have the specified namepublic HtmlRadioButtonInput getCheckedRadioButton(String name)
name
- the name of the radio button
public 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 for
ElementNotFoundException
- if this form does not contain any inputs with the specified valuepublic List<HtmlInput> getInputsByValue(String value)
value
- the value to search for
public List<HtmlElement> getLostChildren()
protected void preventDefault()
preventDefault
in class HtmlElement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |