com.gargoylesoftware.htmlunit.html
Interface FormFieldWithNameHistory

All Known Implementing Classes:
HtmlButton, HtmlButtonInput, HtmlCheckBoxInput, HtmlFileInput, HtmlHiddenInput, HtmlImageInput, HtmlInput, HtmlPasswordInput, HtmlRadioButtonInput, HtmlResetInput, HtmlSelect, HtmlSubmitInput, HtmlTextArea, HtmlTextInput

public interface FormFieldWithNameHistory

Interface for form fields where the original field name still matters even once it has been changed.

Example:
With
<input name="foo"/>
following script will work
theForm.foo.name = 'newName';
theForm.foo.value = 'some value';

Depending on the simulated browser the form field is reachable only through its original name or through all the names it has had.

Version:
$Revision: 5796 $
Author:
Marc Guillemot

Method Summary
 String getOriginalName()
          Gets the first value of the name attribute of this field before any change.
 Collection<String> getPreviousNames()
          Get all the names this field had before the current one.
 

Method Detail

getOriginalName

String getOriginalName()
Gets the first value of the name attribute of this field before any change.

Returns:
the original name (which is the same as the current one when no change has been made)

getPreviousNames

Collection<String> getPreviousNames()
Get all the names this field had before the current one.

Returns:
an empty collection if the name attribute has never been changed.


Copyright © 2002-2010 Gargoyle Software Inc.. All Rights Reserved.