net.sf.click.control
Class Reset
java.lang.Object
net.sf.click.control.AbstractControl
net.sf.click.control.Field
net.sf.click.control.Button
net.sf.click.control.Reset
- All Implemented Interfaces:
- Control, Serializable
- public class Reset
- extends Button
Provides a Reset control: <input type='reset'>.
The Reset control provides input type reset field. The Reset button is
uses to reset the any changes a user may have made to a forms values. The
Reset button performs no server side processing.
Reset Example
The example below illustrates adding a Reset button to a Form, and shows
how it will be rendered as HTML.
Reset reset = new Reset("reset");
reset.setTitle("Undo changes");
form.add(reset);
HTML output:
<input type='reset' name='reset' value='Reset' title='Undo changes'>
See also W3C HTML reference
INPUT
- Author:
- Malcolm Edgar
- See Also:
Button
,
Submit
,
Serialized Form
Fields inherited from class net.sf.click.control.Field |
disabled, error, focus, form, help, label, readonly, required, tabindex, title, validate, value |
Constructor Summary |
Reset()
Create a Reset field with no name defined. |
Reset(String name)
Create a Reset button with the given name. |
Reset(String name,
String label)
Create a Reset button with the given name and label. |
Methods inherited from class net.sf.click.control.Field |
bindRequestValue, getError, getErrorLabel, getFocus, getFocusJavaScript, getForm, getHelp, getId, getLabel, getRequestValue, getTabIndex, getTextAlign, getTitle, getValidate, getValidationJavaScript, getValue, getValueObject, getWidth, isDisabled, isHidden, isReadonly, isRequired, isValid, onInit, setDisabled, setError, setErrorMessage, setErrorMessage, setErrorMessage, setErrorMessage, setFocus, setForm, setHelp, setLabel, setListener, setParent, setReadonly, setRequired, setTabIndex, setTextAlign, setTitle, setValidate, setValue, setValueObject, setWidth, validate |
Methods inherited from class net.sf.click.control.AbstractControl |
addStyleClass, appendAttributes, getActionListener, getAttribute, getAttributes, getContext, getHtmlImports, getMessage, getMessage, getMessage, getMessages, getName, getPage, getParent, getStyle, getStyles, hasAttribute, hasAttributes, hasStyles, onDeploy, onDestroy, registerActionEvent, removeStyleClass, renderTagBegin, renderTagEnd, setActionListener, setAttribute, setId, setName, setStyle, toString |
Reset
public Reset(String name)
- Create a Reset button with the given name.
- Parameters:
name
- the button name
Reset
public Reset(String name,
String label)
- Create a Reset button with the given name and label.
- Parameters:
name
- the button namelabel
- the button display label
Reset
public Reset()
- Create a Reset field with no name defined.
Please note the control's name must be defined before it is valid.
getType
public String getType()
- Return the input type: 'reset'.
- Overrides:
getType
in class Button
- Returns:
- the input type: 'reset'