|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.click.control.AbstractControl net.sf.click.control.Field net.sf.click.control.TextField net.sf.click.extras.control.NumberField net.sf.click.extras.control.DoubleField
Provides a Double Field control: <input type='text'>.
Double Field |
PageImports
object in your page
header section. For example:
<html> <head> $imports </head> <body> $form </body> </html>The DoubleField has left justified horizontal text alignment,
Field.setTextAlign(String)
.
See also W3C HTML reference
INPUT
Field Summary |
Fields inherited from class net.sf.click.extras.control.NumberField |
HTML_IMPORTS, maxvalue, minvalue, numberFormat, pattern, VALIDATE_NUMBER_FIELD_FUNCTION |
Fields inherited from class net.sf.click.control.TextField |
maxLength, minLength, size, VALIDATE_TEXTFIELD_FUNCTION |
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 | |
DoubleField()
Create a DoubleField with no name defined. |
|
DoubleField(String name)
Construct a DoubleField with the given name. |
|
DoubleField(String name,
boolean required)
Construct a DoubleField with the given name and required status. |
|
DoubleField(String name,
String label)
Construct a DoubleField with the given name and label. |
|
DoubleField(String name,
String label,
boolean required)
Construct a DoubleField with the given name, label and required status. |
|
DoubleField(String name,
String label,
int size)
Construct the DoubleField with the given name, label and size. |
|
DoubleField(String name,
String label,
int size,
boolean required)
Construct the DoubleField with the given name, label, size and required status. |
Method Summary | |
Double |
getDouble()
Return the field Double value, or null if value was empty or a parsing error occured. |
Float |
getFloat()
Return the field Float value, or null if value was empty or a parsing error occured. |
Object |
getValueObject()
Return the field Double value, or null if value was empty or a parsing error occured. |
void |
setDouble(Double doubleValue)
Set the Double value of the field. |
void |
validate()
Validates the NumberField request submission. |
Methods inherited from class net.sf.click.extras.control.NumberField |
getHtmlImports, getMaxValue, getMinValue, getNumber, getNumberFormat, getPattern, getRequestValue, getValidationJavaScript, onDeploy, setMaxValue, setMinValue, setNumber, setNumberFormat, setPattern, setValueObject |
Methods inherited from class net.sf.click.control.TextField |
getControlSizeEst, getMaxLength, getMinLength, getSize, getTag, getType, render, setMaxLength, setMinLength, setSize |
Methods inherited from class net.sf.click.control.Field |
bindRequestValue, getError, getErrorLabel, getFocus, getFocusJavaScript, getForm, getHelp, getId, getLabel, getTabIndex, getTextAlign, getTitle, getValidate, getValue, getWidth, isDisabled, isHidden, isReadonly, isRequired, isValid, onInit, onProcess, setDisabled, setError, setErrorMessage, setErrorMessage, setErrorMessage, setErrorMessage, setFocus, setForm, setHelp, setLabel, setListener, setParent, setReadonly, setRequired, setTabIndex, setTextAlign, setTitle, setValidate, setValue, setWidth |
Methods inherited from class net.sf.click.control.AbstractControl |
addStyleClass, appendAttributes, getActionListener, getAttribute, getAttributes, getContext, getMessage, getMessage, getMessage, getMessages, getName, getPage, getParent, getStyle, getStyles, hasAttribute, hasAttributes, hasStyles, onDestroy, onRender, 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 |
public DoubleField(String name)
name
- the name of the fieldpublic DoubleField(String name, String label)
name
- the name of the fieldlabel
- the label of the fieldpublic DoubleField(String name, boolean required)
name
- the name of the fieldrequired
- the field required statuspublic DoubleField(String name, String label, boolean required)
name
- the name of the fieldlabel
- the label of the fieldrequired
- the field required statuspublic DoubleField(String name, String label, int size)
name
- the name of the fieldlabel
- the label of the fieldsize
- the size of the fieldpublic DoubleField(String name, String label, int size, boolean required)
name
- the name of the fieldlabel
- the label of the fieldsize
- the size of the fieldrequired
- the field required statuspublic DoubleField()
Method Detail |
public Double getDouble()
public void setDouble(Double doubleValue)
doubleValue
- the double value to setpublic Float getFloat()
public Object getValueObject()
getValueObject
in class NumberField
public void validate()
Field.getValue()
) is
set to the formatted value of the user input.
A field error message is displayed if a validation error occurs.
These messages are defined in the resource bundle:
- /click-control.properties
- field-required-error
- number-format-error
- number-maxvalue-error
- number-minvalue-error
validate
in class NumberField
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |