com.pushtotest.tool.parser.html
Interface FormElement

All Known Implementing Classes:
ButtonElement, CheckElement, FormElementWrapper, HiddenElement, OptionElement, RadioElement, SelectElement, TextAreaElement, TextElement

public interface FormElement

This is an interface that represents an element in an HTML form.


Method Summary
 java.lang.String getId()
          Gets the id parameter of this form element.
 java.lang.String getLabel()
          Gets the label value for this element.
 java.lang.String getName()
          Gets the name parameter of this form element if there is one.
 HTMLForm getParentForm()
          Returns the Form object that this element is a part of.
 java.lang.String getType()
          The type of this form element for use in conditionals, etc.
 java.lang.String getValueAsString()
          The value that this form element has.
 void isXhtml(boolean xhtml)
          Is this an XHTML form?
 void setId(java.lang.String id)
          Gets the id parameter of this form element.
 void setLabel(java.lang.String label)
          Sets the label value for this element.
 void setName(java.lang.String name)
          Sets the name of this form.
 void setParentForm(HTMLForm parent)
          Sets the parent HTMLFrom of this element.
 void setValueAsString(java.lang.String value)
          Sets the value of this form element as a string representation.
 

Method Detail

getParentForm

HTMLForm getParentForm()
Returns the Form object that this element is a part of.

Returns:
The Parent {#link com.pushtotest.tool.protocolhandler.html.HTMLForm HTMLForm}

setParentForm

void setParentForm(HTMLForm parent)
Sets the parent HTMLFrom of this element.

Parameters:
parent - The Parent {#link com.pushtotest.tool.protocolhandler.html.HTMLForm HTMLForm}

getName

java.lang.String getName()
Gets the name parameter of this form element if there is one.

Returns:
The name parameter or null if none exists.

isXhtml

void isXhtml(boolean xhtml)
Is this an XHTML form?

Parameters:
xhtml - Whether this is XHTML or not.

setName

void setName(java.lang.String name)
Sets the name of this form.

Parameters:
name - The name parameter.

getId

java.lang.String getId()
Gets the id parameter of this form element.

Returns:
The id parameter.

setId

void setId(java.lang.String id)
Gets the id parameter of this form element.

Parameters:
id - The id parameter or null if none exists.

getLabel

java.lang.String getLabel()
Gets the label value for this element.

Returns:
The label on this form element.

setLabel

void setLabel(java.lang.String label)
Sets the label value for this element.

Parameters:
label - The label to set.

getType

java.lang.String getType()
The type of this form element for use in conditionals, etc.

Returns:
The type of this form.

getValueAsString

java.lang.String getValueAsString()
The value that this form element has.

Returns:
The value contained by this form element or null if none exists.

setValueAsString

void setValueAsString(java.lang.String value)
Sets the value of this form element as a string representation. Some elements might have other value setter methods, this is to insure that all of them have one common one.

Parameters:
value - The value of the form element as a string.