Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.meterware.httpunit
Class SubmitButton

    java.lang.Object
      |
      +--com.meterware.httpunit.FormControl
            |
            +--com.meterware.httpunit.SubmitButton

public class SubmitButton
extends FormControl

This class represents a submit button in an HTML form.

Field Summary
`static SubmitButton` | `UNNAMED_BUTTON`

Method Summary
`protected void` | `claimValueIsRequired(List values, String value)` Removes the specified required value from the list of values, throwing an exception if it is missing.
`boolean` | `equals(Object o)`
`String[]` | `getDisplayedOptions()` Returns the list of values displayed by this control, if any.
`String` | `getID()` Returns the ID associated with the button, if any.
`String` | `getName()` Returns the name of this control.
`String[]` | `getOptionValues()` Returns the values permitted in this control.
`ScriptableObject` | `getScriptableObject()` Returns a scriptable object which can act as a proxy for this control.
`String` | `getValue()` Returns the value associated with this submit button.
`protected String` | `getValueAttribute()` Returns the default value of this control in the form.
`String[]` | `getValues()` Returns the current value(s) associated with this control.
`int` | `hashCode()`
`boolean` | `isDisabled()` Returns true if this control is disabled, meaning that it will not send a value to the server as part of a request.
`boolean` | `isExclusive()` Returns true if only one control of this kind can have a value.
`boolean` | `isFileParameter()` Returns true if this control accepts a file for upload.
`boolean` | `isImageButton()` Returns true if this submit button is an image map.
`boolean` | `isMultiValued()` Returns true if a single control can have multiple values.
`boolean` | `isReadOnly()` Returns true if this control is read-only.
`boolean` | `isTextControl()` Returns true if this control accepts free-form text.
`void` | `setLocation(int x, int y)`
`void` | `setPressed(boolean pressed)`
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### UNNAMED_BUTTON

    public static SubmitButton UNNAMED_BUTTON

Method Detail

### getValue

    public String getValue()

  Returns the value associated with this submit button.

### getID

    public String getID()

  Returns the ID associated with the button, if any.
  Returns:
    the button ID, or an empty string if no ID is defined.

### isImageButton

    public boolean isImageButton()

  Returns true if this submit button is an image map.

### getValues

    public String[] getValues()

  Returns the current value(s) associated with this control. These values will be transmitted to the server if the control is 'successful'.
  Overrides:
    `getValues` in class `FormControl`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `Object`

### setPressed

    public void setPressed(boolean pressed)

### setLocation

    public void setLocation(int x,
                            int y)

### getName

    public String getName()

  Returns the name of this control. If no name is specified, defaults to the empty string.

### getScriptableObject

    public ScriptableObject getScriptableObject()

  Returns a scriptable object which can act as a proxy for this control.

### getOptionValues

    public String[] getOptionValues()

  Returns the values permitted in this control. Does not apply to text or file controls.

### getDisplayedOptions

    public String[] getDisplayedOptions()

  Returns the list of values displayed by this control, if any.

### isReadOnly

    public boolean isReadOnly()

  Returns true if this control is read-only.

### isDisabled

    public boolean isDisabled()

  Returns true if this control is disabled, meaning that it will not send a value to the server as part of a request.

### isTextControl

    public boolean isTextControl()

  Returns true if this control accepts free-form text.

### isExclusive

    public boolean isExclusive()

  Returns true if only one control of this kind can have a value. This is true for radio buttons.

### isMultiValued

    public boolean isMultiValued()

  Returns true if a single control can have multiple values.

### isFileParameter

    public boolean isFileParameter()

  Returns true if this control accepts a file for upload.

### getValueAttribute

    protected String getValueAttribute()

  Returns the default value of this control in the form. If no value is specified, defaults to the empty string.

### claimValueIsRequired

    protected final void claimValueIsRequired(List values,
                                              String value)

  Removes the specified required value from the list of values, throwing an exception if it is missing.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD