org.apache.click.control
Class Reset

java.lang.Object
  extended by org.apache.click.control.AbstractControl
      extended by org.apache.click.control.Field
          extended by org.apache.click.control.Button
              extended by org.apache.click.control.Reset
All Implemented Interfaces:
Serializable, Control, Stateful

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

See Also:
Button, Submit, Serialized Form

Field Summary
 
Fields inherited from class org.apache.click.control.Field
disabled, error, focus, form, help, label, labelStyle, labelStyleClass, parentStyleClassHint, parentStyleHint, readonly, required, tabindex, title, trim, validate, value
 
Fields inherited from class org.apache.click.control.AbstractControl
actionListener, attributes, behaviors, headElements, listener, listenerMethod, messages, name, parent, styles
 
Fields inherited from interface org.apache.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 org.apache.click.control.Button
getControlSizeEst, getOnClick, getTag, onProcess, render, setOnClick
 
Methods inherited from class org.apache.click.control.Field
bindRequestValue, getError, getErrorLabel, getFocus, getFocusJavaScript, getForm, getHelp, getId, getLabel, getLabelStyle, getLabelStyleClass, getParentStyleClassHint, getParentStyleHint, getRequestValue, getState, getTabIndex, getTextAlign, getTitle, getValidate, getValidationJavaScript, getValue, getValueObject, getWidth, isDisabled, isHidden, isReadonly, isRequired, isTrim, isValid, removeState, renderTagBegin, restoreState, saveState, setDisabled, setError, setErrorMessage, setErrorMessage, setFocus, setForm, setHelp, setLabel, setLabelStyle, setLabelStyleClass, setListener, setParent, setParentStyleClassHint, setParentStyleHint, setReadonly, setRequired, setState, setTabIndex, setTextAlign, setTitle, setTrim, setValidate, setValue, setValueObject, setWidth, validate
 
Methods inherited from class org.apache.click.control.AbstractControl
addBehavior, addStyleClass, appendAttributes, dispatchActionEvent, getActionListener, getAttribute, getAttributes, getBehaviors, getContext, getHeadElements, getHtmlImports, getMessage, getMessage, getMessages, getName, getPage, getParent, getStyle, getStyles, hasAttribute, hasAttributes, hasBehaviors, hasStyles, isAjaxTarget, onDeploy, onDestroy, onInit, onRender, removeBehavior, removeStyleClass, 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'