Package org.zkoss.stateless.sul
Interface ISearchbox
- All Superinterfaces:
IAnyGroup<ISearchbox>,IComponent<ISearchbox>,IDisable<ISearchbox>,IHtmlBasedComponent<ISearchbox>
public interface ISearchbox
extends IHtmlBasedComponent<ISearchbox>, IDisable<ISearchbox>, IAnyGroup<ISearchbox>
Immutable
Searchbox component.
A dropdown list that allows users to search and select items.
Support @Action
| Name | Action Type |
|---|---|
| onSelect | ActionData: SelectData
Represents an action caused by user's the selection changed at the client. |
| onOpen | ActionData: OpenData
Represents an action that indicates an open state that is changed at the client. |
| onSearching | ActionData: InputData
Represents an action sent back to the server caused by user's input text. |
Mouseless Entry
UPorDOWNto pop up the list if being focused.ESCto close the list.UP,DOWN,HOME,END,PAGE UPandPAGE DOWNto change the selection of the item from the list.ENTERto confirm the change of selection.DELETEorBACKSPACEto clear the selection.
- Author:
- katherine
- See Also:
-
Searchbox
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classBuilds instances of typeISearchbox.static classBuilds an updater of typeISearchboxforUiAgent.smartUpdate(Locator, SmartUpdater). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ISearchboxConstant for default attributes of this immutable component. -
Method Summary
Modifier and TypeMethodDescriptionReturns the placeholder text.Returns the placeholder message of the search text field, or null to use the default message.Returns the value of the search textdefault StringReturns the client widget class.default booleanReturns whether to automatically close the list if a user is selected any item.default booleanReturns whether multiple selections are allowed.default booleanisOpen()Returns whether this searchbox is open.static ISearchboxReturns the instance with the given id.withAutoclose(boolean autoclose) Returns a copy ofthisimmutable component with the specifiedautoclose.withMultiple(boolean multiple) Returns a copy ofthisimmutable component with the specifiedmultiple.withOpen(boolean open) Returns a copy ofthisimmutable component with the specifiedopen.withPlaceholder(String placeholder) Returns a copy ofthisimmutable component with the specifiedplaceholder.withSearchMessage(String searchMessage) Returns a copy ofthisimmutable component with the specifiedsearchMessage.withSearchText(String searchText) Returns a copy ofthisimmutable component with the specifiedsearchText.Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, 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.IDisable
isDisabled, withDisabledMethods 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, withZIndex
-
Field Details
-
DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Details
-
getWidgetClass
Returns the client widget class.Default:
"zkmax.inp.Searchbox"- Specified by:
getWidgetClassin interfaceIComponent<ISearchbox>- Returns:
-
getSearchMessage
Returns the placeholder message of the search text field, or null to use the default message. -
withSearchMessage
Returns a copy ofthisimmutable component with the specifiedsearchMessage.Sets the placeholder message of the search text field.
- Parameters:
searchMessage- The placeholder message of the search text fieldDefault:
null.- Returns:
- A modified copy of the
thisobject
-
getPlaceholder
Returns the placeholder text.Default:
null -
withPlaceholder
Returns a copy ofthisimmutable component with the specifiedplaceholder.Sets the placeholder text that is displayed when the selected item is empty.
- Parameters:
placeholder- The placeholder text that is displayed when the selected item is empty.Default:
null.- Returns:
- A modified copy of the
thisobject
-
isMultiple
default boolean isMultiple()Returns whether multiple selections are allowed.Default:
false. -
withMultiple
Returns a copy ofthisimmutable component with the specifiedmultiple.Sets whether multiple selections are allowed.
Notice that, if a model is assigned, it will change the model's state (by
Selectable.setMultiple(boolean)).- Parameters:
multiple- Whether multiple selections are allowed.Default:
false.- Returns:
- A modified copy of the
thisobject
-
isOpen
default boolean isOpen()Returns whether this searchbox is open.Default:
false. -
withOpen
Returns a copy ofthisimmutable component with the specifiedopen.Sets whether to open or not for the searchbox.
- Parameters:
open- Whether to open or not for the searchboxDefault:
false.- Returns:
- A modified copy of the
thisobject
-
isAutoclose
default boolean isAutoclose()Returns whether to automatically close the list if a user is selected any item.Default:
false -
withAutoclose
Returns a copy ofthisimmutable component with the specifiedautoclose.Sets whether to automatically close the list if a user is selected any item.
- Parameters:
autoclose- Whether to automatically close the list if a user is selected any item.Default:
false.- Returns:
- A modified copy of the
thisobject
-
getSearchText
Returns the value of the search text- Since:
- 10.2.0
-
withSearchText
Returns a copy ofthisimmutable component with the specifiedsearchText. Sets the value of the search text.- Returns:
- A modified copy of the
thisobject - Since:
- 10.2.0
-
ofId
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-