public class Textbox extends InputElement
See Specification.
Default getZclass()
: z-textbox.(since 3.5.0)
When multiline is true, only default mold is available.
_value
AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
protected Object |
coerceFromString(String value)
Coerces the value passed to
setValue(java.lang.String) . |
protected String |
coerceToString(Object value)
Coerces the value passed to
setValue(java.lang.String) . |
org.zkoss.zk.ui.sys.PropertyAccess |
getPropertyAccess(String prop) |
int |
getRows()
Returns the rows.
|
String |
getType()
Returns the type.
|
String |
getValue()
Returns the value.
|
String |
getZclass() |
boolean |
isMultiline()
Returns whether it is multiline.
|
boolean |
isTabbable()
Returns whether TAB is allowed.
|
protected void |
renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) |
void |
setMultiline(boolean multiline)
Sets whether it is multiline.
|
void |
setRows(int rows)
Sets the rows.
|
void |
setTabbable(boolean tabbable)
Sets whether TAB is allowed.
|
void |
setType(String type)
Sets the type.
|
void |
setValue(String value)
Sets the value.
|
checkUserError, clearErrorMessage, clearErrorMessage, getCols, getConstraint, getErrorboxIconSclass, getErrorboxSclass, getErrorMessage, getInstant, getMaxlength, getName, getPlaceholder, getRawText, getRawValue, getTargetValue, getText, isChildable, isDisabled, isInplace, isInstant, isReadonly, isValid, marshall, onWrongValue, select, service, setCols, setConstraint, setConstraint, setDisabled, setErrorboxIconSclass, setErrorboxSclass, setErrorMessage, setInplace, setInstant, setMaxlength, setName, setPlaceholder, setRawValue, setReadonly, setSelectedText, setSelectionRange, setText, setValueDirectly, showCustomError, unmarshall, validate
getContext, getCtrlKeys, getPopup, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
public Textbox()
public Textbox(String value) throws org.zkoss.zk.ui.WrongValueException
org.zkoss.zk.ui.WrongValueException
public String getValue() throws org.zkoss.zk.ui.WrongValueException
InputElement.getText()
.
Default: "".
org.zkoss.zk.ui.WrongValueException
- if user entered a wrong valuepublic void setValue(String value) throws org.zkoss.zk.ui.WrongValueException
value
- the value; If null, it is considered as empty.org.zkoss.zk.ui.WrongValueException
- if value is wrongprotected Object coerceFromString(String value) throws org.zkoss.zk.ui.WrongValueException
setValue(java.lang.String)
.
Default: convert null to an empty string.
coerceFromString
in class InputElement
org.zkoss.zk.ui.WrongValueException
protected String coerceToString(Object value)
setValue(java.lang.String)
.
Default: convert null to an empty string.
coerceToString
in class InputElement
public String getType()
Default: text.
getType
in class InputElement
public void setType(String type) throws org.zkoss.zk.ui.WrongValueException
type
- the type. Acceptable values are "text" and "password".
Unlike XUL, "timed" is redundant because it is enabled as long as
onChanging is added. Since 6.5.0 type also support tel, email and url.org.zkoss.zk.ui.WrongValueException
public int getRows()
Default: 1.
public void setRows(int rows) throws org.zkoss.zk.ui.WrongValueException
org.zkoss.zk.ui.WrongValueException
public boolean isMultiline()
Default: false.
isMultiline
in class InputElement
public void setMultiline(boolean multiline)
public boolean isTabbable()
Default: false.
public void setTabbable(boolean tabbable)
Default: false.
public Object clone()
clone
in interface org.zkoss.zk.ui.Component
clone
in class InputElement
public org.zkoss.zk.ui.sys.PropertyAccess getPropertyAccess(String prop)
getPropertyAccess
in interface org.zkoss.zk.ui.sys.ComponentCtrl
getPropertyAccess
in class InputElement
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws IOException
renderProperties
in class InputElement
IOException
public String getZclass()
getZclass
in class org.zkoss.zk.ui.HtmlBasedComponent
Copyright © 2017. All rights reserved.