net.sf.click.control
Class Reset

java.lang.Object
  extended bynet.sf.click.control.AbstractControl
      extended bynet.sf.click.control.Field
          extended bynet.sf.click.control.Button
              extended bynet.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

Field Summary
 
Fields inherited from class net.sf.click.control.Field
disabled, error, focus, form, help, label, readonly, required, tabindex, title, validate, value
 
Fields inherited from class net.sf.click.control.AbstractControl
actionListener, attributes, listener, listenerMethod, messages, name, parent, styles
 
Fields inherited from interface net.sf.click.Control
CONTROL_MESSAGES
 
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.
 
Method Summary
 String getType()
          Return the input type: 'reset'.
 
Methods inherited from class net.sf.click.control.Button
getControlSizeEst, getOnClick, getTag, onProcess, onRender, render, setOnClick
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 name
label - 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.

Method Detail

getType

public String getType()
Return the input type: 'reset'.

Overrides:
getType in class Button
Returns:
the input type: 'reset'