public class Textfield extends AbstractComponent
ACTIVE, browserMode, DEFAULT, ID, IE, INVISIBLE, isSensitive, label, NS, ON_BLUR, ON_CHANGE, ON_CLICK, ON_DBLCLICK, ON_FOCUS, ON_KEY_DOWN, ON_KEY_PRESS, ON_KEY_UP, ON_LOAD, ON_MOUSE_DOWN, ON_MOUSE_MOVE, ON_MOUSE_OUT, ON_MOUSE_UP, ON_RESET, ON_SELECT, ON_SUBMIT, ON_UNLOAD, parent, parentElem, READONLY, root, viewMode
LABELLEDBY
Constructor and Description |
---|
Textfield()
Constructs a new empty Textfield component.
|
Textfield(String name) |
Textfield(String name,
int size) |
Textfield(String name,
int size,
boolean enabled) |
Textfield(String name,
String value)
Constructor with name and value.
|
Textfield(String name,
String value,
int maxlength,
int size)
Constructor with name, value maxlength and size
|
Textfield(String name,
String value,
String styleClass)
Constructor with name and value.
|
Modifier and Type | Method and Description |
---|---|
Object |
getContent()
Get the value.
|
int |
getMaxlength() |
int |
getSize() |
String |
getValue() |
void |
setContent(Object o)
Set the value attribute.
|
void |
setMaxlength(int length)
sets the maximum length of the text in the textfield
|
void |
setSize(int size)
sets the size of the textfield
|
void |
setValue(String value)
sets the initial displayed value of the field
|
addClass, clone, create, getAttribute, getBrowserMode, getId, getLabel, getName, getParent, getParentElement, getRoot, getRootName, getStyle, getViewMode, init, init, init, removeAttribute, removeClass, setActionListener, setAttribute, setBrowserMode, setClass, setEncoding, setExpandEmptyElements, setId, setIndenting, setLabel, setName, setNewLines, setParent, setParentElement, setRootName, setStyle, setViewMode, show, show, toggleClass, toString
public Textfield()
public Textfield(String name)
public Textfield(String name, int size)
public Textfield(String name, int size, boolean enabled)
public Textfield(String name, String value)
name
- the name and id of the field.value
- the value of the fieldpublic Textfield(String name, String value, String styleClass)
name
- the group where the field belongs tovalue
- the value of the fieldstyleClass
- the name of a CSS classpublic void setMaxlength(int length)
length
- - the maximum lengthpublic int getMaxlength()
public void setSize(int size)
size
- - the size of the input fieldpublic int getSize()
public void setValue(String value)
value
- - the valuepublic String getValue()
public void setContent(Object o)
setContent
in interface Component
setContent
in class AbstractComponent
o
- any object where the string representation is used for renderingpublic Object getContent()
getContent
in interface Component
getContent
in class AbstractComponent
@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.