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
Modifier and Type | Method and Description |
---|---|
protected void |
checkBeforeSetRows()
Internal check if there is any use of vflex and height before setRows
|
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 |
isSubmitByEnter()
Returns whether it is submitByEnter,
If submitByEnter is true, press enter will fire onOK event instead of move to next line,
you should press shift + enter if you want to move to next line.
|
boolean |
isTabbable()
Returns whether TAB is allowed.
|
protected void |
renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) |
void |
setHeight(String height) |
void |
setMultiline(boolean multiline)
Sets whether it is multiline.
|
void |
setRows(int rows)
Sets the rows.
|
void |
setSubmitByEnter(boolean submitByEnter)
Sets whether it is submitByEnter.
|
void |
setTabbable(boolean tabbable)
Sets whether TAB is allowed.
|
void |
setType(String type)
Sets the type.
|
void |
setValue(String value)
Sets the value.
|
void |
setVflex(String flex) |
checkUserError, clearErrorMessage, clearErrorMessage, getCols, getConstraint, getErrorboxIconSclass, getErrorboxSclass, getErrorMessage, getInputAttributes, 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, setInputAttributes, setInputAttributes, setInsertedText, 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
addSclass, evalCSSFlex, focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, 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, 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, invalidatePartial, isInitialized, 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
Note: Not allowed to set rows and height/vflex at the same time
org.zkoss.zk.ui.WrongValueException
protected void checkBeforeSetRows() throws org.zkoss.zk.ui.UiException
org.zkoss.zk.ui.UiException
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 boolean isSubmitByEnter()
Default: false.
public void setSubmitByEnter(boolean submitByEnter)
submitByEnter
- whether it is submitByEnterpublic void setVflex(String flex)
setVflex
in class org.zkoss.zk.ui.HtmlBasedComponent
public void setHeight(String height)
setHeight
in class org.zkoss.zk.ui.HtmlBasedComponent
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 © 2021. All rights reserved.