Interface ITextboxBase<I extends ITextboxBase>
- All Superinterfaces:
IChildrenOfInputgroup<I>,IComponent<I>,IHtmlBasedComponent<I>,IInputElement<I,,String> IReadonly<I>,IXulElement<I>
Textbox base component.- Author:
- jumperchen
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumSpecifies the values to the textbox's type. -
Method Summary
Modifier and TypeMethodDescriptiondefault intgetRows()Returns the rows.default StringgetType()Returns the type.default booleanReturns whether it is multiline.default booleanReturns 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.default booleanReturns whether TAB is allowed.withMultiline(boolean multiline) Returns a copy ofthisimmutable component with the specifiedmultiline.withRows(int rows) Returns a copy ofthisimmutable component with the specifiedrows.withSubmitByEnter(boolean submitByEnter) Returns a copy ofthisimmutable component with the specifiedsubmitByEnter.withTabbable(boolean tabbable) Returns a copy ofthisimmutable component with the specifiedtabbable.Returns a copy ofthisimmutable component with the specifiedtype.default IwithType(ITextboxBase.Type type) Returns a copy ofthisimmutable component with the specifiedtype.Returns a copy ofthisimmutable component with the specifiedvalue.Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetClass, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverridesMethods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getSkeleton, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withSkeleton, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndexMethods inherited from interface org.zkoss.stateless.sul.IInputElement
getCols, getConstraint, getErrorboxIconSclass, getErrorboxSclass, getErrorMessage, getInputAttributes, getInstant, getMaxlength, getName, getPlaceholder, getValue, isDisabled, isInplace, withCols, withConstraint, withDisabled, withErrorboxIconSclass, withErrorboxSclass, withErrorMessage, withInplace, withInputAttributes, withInstant, withMaxlength, withName, withPlaceholderMethods inherited from interface org.zkoss.stateless.sul.IReadonly
isReadonly, withReadonlyMethods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
Method Details
-
withValue
Description copied from interface:IInputElementReturns a copy ofthisimmutable component with the specifiedvalue.Sets the value of the input component.
- Specified by:
withValuein interfaceIInputElement<I extends ITextboxBase,String> - Parameters:
value- The value of the input component.Default:
null.- Returns:
- A modified copy of the
thisobject
-
isMultiline
default boolean isMultiline()Returns whether it is multiline.Default:
false. -
withMultiline
Returns a copy ofthisimmutable component with the specifiedmultiline.Sets whether it is multiline.
- Parameters:
multiline-trueto enable multiline.Default:
false.- Returns:
- A modified copy of the
thisobject
-
getRows
default int getRows()Returns the rows.Default:
1. -
withRows
Returns a copy ofthisimmutable component with the specifiedrows.Sets the rows.
Note: Not allowed to set rows and height/vflex at the same time
- Parameters:
rows- The number of the row to display.Default:
1.- Returns:
- A modified copy of the
thisobject
-
isTabbable
default boolean isTabbable()Returns whether TAB is allowed. If true, the user can enter TAB in the textbox, rather than change focus.Default:
false. -
withTabbable
Returns a copy ofthisimmutable component with the specifiedtabbable.Sets whether TAB is allowed. If true, the user can enter TAB in the textbox, rather than change focus.
- Parameters:
tabbable-trueto enable TAB in the textbox.Default:
false.- Returns:
- A modified copy of the
thisobject
-
getType
Returns the type.Default:
"text". -
withType
Returns a copy ofthisimmutable component with the specifiedtype.Sets the type of the textbox. Acceptable values are
"text","password","tel","email", and"url"- Parameters:
type- The type of the textbox.Default:
"text".- Returns:
- A modified copy of the
thisobject
-
withType
Returns a copy ofthisimmutable component with the specifiedtype.Sets the type of the textbox. Acceptable values are
ITextboxBase.Type- Parameters:
type- The type of the textbox.Default:
"text".- Returns:
- A modified copy of the
thisobject - See Also:
-
isSubmitByEnter
default 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.Default: false.
-
withSubmitByEnter
Returns a copy ofthisimmutable component with the specifiedsubmitByEnter.Sets 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.
- Parameters:
submitByEnter-trueto enable whether it is submitByEnterDefault:
false.- Returns:
- A modified copy of the
thisobject
-