|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.click.control.AbstractControl
org.apache.click.control.Field
org.apache.click.control.TextField
org.apache.click.extras.control.NumberField
org.apache.click.extras.control.IntegerField
public class IntegerField
Provides a Integer Field control: <input type='text'>.
| Integer Field |
<html> <head> $headElements </head> <body> $form $jsElements </body> </html>The IntegerField has left justified horizontal text alignment,
Field.setTextAlign(String).
See also W3C HTML reference
INPUT
| Field Summary |
|---|
| Fields inherited from class org.apache.click.extras.control.NumberField |
|---|
maxvalue, minvalue, numberFormat, pattern, VALIDATE_NUMBER_FIELD_FUNCTION |
| Fields inherited from class org.apache.click.control.TextField |
|---|
maxLength, minLength, size, VALIDATE_TEXTFIELD_FUNCTION |
| 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 | |
|---|---|
IntegerField()
Create a IntegerField with no name defined. |
|
IntegerField(String name)
Construct a IntegerField field with the given name. |
|
IntegerField(String name,
boolean required)
Construct a IntegerField field with the given name and required status. |
|
IntegerField(String name,
String label)
Construct a IntegerField field with the given name and label. |
|
IntegerField(String name,
String label,
boolean required)
Construct a IntegerField field with the given name, label and required status. |
|
IntegerField(String name,
String label,
int size)
Construct the IntegerField with the given name, label and size. |
|
IntegerField(String name,
String label,
int size,
boolean required)
Construct the IntegerField with the given name, label, size and required status. |
|
| Method Summary | |
|---|---|
Integer |
getInteger()
Return the field Integer value, or null if value was empty or a parsing error occurred. |
Long |
getLong()
Return the field Long value, or null if value was empty or a parsing error occurred. |
Object |
getValueObject()
Return the field Integer value, or null if value was empty or a parsing error occurred. |
void |
setInteger(Integer integerValue)
Set the Integer value of the field. |
void |
setValueObject(Object object)
Set the integer value of the field using the given object. |
void |
validate()
Validate the IntegerField request submission. |
| Methods inherited from class org.apache.click.extras.control.NumberField |
|---|
getHeadElements, getMaxValue, getMinValue, getNumber, getNumberFormat, getPattern, getValidationJavaScript, setMaxValue, setMinValue, setNumber, setNumberFormat, setPattern |
| Methods inherited from class org.apache.click.control.TextField |
|---|
getControlSizeEst, getMaxLength, getMinLength, getSize, getTag, getType, render, setMaxLength, setMinLength, setSize |
| 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, getValue, getWidth, isDisabled, isHidden, isReadonly, isRequired, isTrim, isValid, onProcess, 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, setWidth |
| Methods inherited from class org.apache.click.control.AbstractControl |
|---|
addBehavior, addStyleClass, appendAttributes, dispatchActionEvent, getActionListener, getAttribute, getAttributes, getBehaviors, getContext, 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 |
|---|
public IntegerField(String name)
name - the name of the field
public IntegerField(String name,
boolean required)
name - the name of the fieldrequired - the field required status
public IntegerField(String name,
String label)
name - the name of the fieldlabel - the label of the field
public IntegerField(String name,
String label,
boolean required)
name - the name of the fieldlabel - the label of the fieldrequired - the field required status
public IntegerField(String name,
String label,
int size)
name - the name of the fieldlabel - the label of the fieldsize - the size of the field
public IntegerField(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 IntegerField()
| Method Detail |
|---|
public Integer getInteger()
public void setInteger(Integer integerValue)
integerValue - the field integer value to setpublic Long getLong()
public Object getValueObject()
getValueObject in class NumberFieldField.getValueObject()public void setValueObject(Object object)
setValueObject in class NumberFieldobject - the object value to setField.setValueObject(Object)public void validate()
- /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 | ||||||||