org.encog.bot.browse.range
Class FormElement

java.lang.Object
  extended by org.encog.bot.browse.range.DocumentRange
      extended by org.encog.bot.browse.range.FormElement
Direct Known Subclasses:
Input

public abstract class FormElement
extends DocumentRange

A document range that represents one individual component to a form.

Author:
jheaton

Constructor Summary
FormElement(WebPage source)
          Construct a form element from the specified web page.
 
Method Summary
 String getName()
           
 Form getOwner()
           
 String getValue()
           
abstract  boolean isAutoSend()
           
 void setName(String name)
          Set the name of this form element.
 void setOwner(Form owner)
          Set the owner of this form element.
 void setValue(String value)
          Set the value for this form element.
 
Methods inherited from class org.encog.bot.browse.range.DocumentRange
addElement, getBegin, getClassAttribute, getElements, getEnd, getIdAttribute, getParent, getSource, getTextOnly, setBegin, setClassAttribute, setEnd, setIdAttribute, setParent, setSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FormElement

public FormElement(WebPage source)
Construct a form element from the specified web page.

Parameters:
source - The page that holds this form element.
Method Detail

getName

public String getName()
Returns:
The name of this form.

getOwner

public Form getOwner()
Returns:
The owner of this form element.

getValue

public String getValue()
Returns:
The value of this form element.

isAutoSend

public abstract boolean isAutoSend()
Returns:
True if this is autosend, which means that the type is NOT submit. This prevents a form that has multiple submit buttons from sending ALL of them in a single post.

setName

public void setName(String name)
Set the name of this form element.

Parameters:
name - The name of this form element.

setOwner

public void setOwner(Form owner)
Set the owner of this form element.

Parameters:
owner - The owner of this form element.

setValue

public void setValue(String value)
Set the value for this form element.

Parameters:
value - The value for this form element.


Copyright © 2011. All Rights Reserved.