Interface FormFieldWithNameHistory
- All Known Implementing Classes:
HtmlButton, HtmlButtonInput, HtmlCheckBoxInput, HtmlColorInput, HtmlDateInput, HtmlDateTimeLocalInput, HtmlEmailInput, HtmlFileInput, HtmlHiddenInput, HtmlImageInput, HtmlInput, HtmlMonthInput, HtmlNumberInput, HtmlPasswordInput, HtmlRadioButtonInput, HtmlRangeInput, HtmlResetInput, HtmlSearchInput, HtmlSelect, HtmlSelectableTextInput, HtmlSubmitInput, HtmlTelInput, HtmlTextArea, HtmlTextInput, HtmlTimeInput, HtmlUrlInput, HtmlWeekInput
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.
-
Method Summary
Modifier and TypeMethodDescriptionGet all the names this field got after the original one.Gets the first value of thenameattribute of this field before any change.
-
Method Details
-
getOriginalName
String getOriginalName()Gets the first value of thenameattribute of this field before any change.- Returns:
- the original name (which is the same as the current one when no change has been made)
-
getNewNames
Collection<String> getNewNames()Get all the names this field got after the original one.- Returns:
- an empty collection if the name attribute has never been changed.
-