Package org.zkoss.stateless.sul
Interface ISelectbox
-
- All Superinterfaces:
IAnyGroup<ISelectbox>
,IComponent<ISelectbox>
,IDisable<ISelectbox>
,IHtmlBasedComponent<ISelectbox>
public interface ISelectbox extends IHtmlBasedComponent<ISelectbox>, IDisable<ISelectbox>, IAnyGroup<ISelectbox>
ImmutableSelectbox
componentSupport @Action
Name Action Type onSelect ActionData: SelectData
Notifies one that the user has selected a new item in the selectbox.- Author:
- katherine
- See Also:
Selectbox
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ISelectbox.Builder
Builds instances of typeISelectbox
.static class
ISelectbox.Updater
Builds an updater of typeISelectbox
forUiAgent.smartUpdate(Locator, SmartUpdater)
.
-
Field Summary
Fields Modifier and Type Field Description static ISelectbox
DEFAULT
Constant for default attributes of this immutable component.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.List<java.lang.String>
getChildren()
Returns the children of this component.default int
getMaxlength()
Returns the maximal length of each item's label.java.lang.String
getName()
Returns the name of this component.default java.lang.String
getWidgetClass()
Returns the client widget class.default boolean
isMultiple()
Returns whether multiple selections are allowed.static ISelectbox
of(java.lang.Iterable<java.lang.String> children)
Returns the instance with the given text children.static ISelectbox
of(java.lang.String... children)
Returns the instance with the given text children.static ISelectbox
ofId(java.lang.String id)
Returns the instance with the given id.ISelectbox
withChildren(java.lang.Iterable<java.lang.String> children)
Returns a copy ofthis
immutable component with the specifiedchildren
.ISelectbox
withChildren(java.lang.String... children)
Returns a copy ofthis
immutable component with the specifiedchildren
.ISelectbox
withMaxlength(int maxlength)
Returns a copy ofthis
immutable component with the specifiedmaxlength
.ISelectbox
withMultiple(boolean multiple)
Returns a copy ofthis
immutable component with the specifiedmultiple
.ISelectbox
withName(java.lang.String name)
Returns a copy ofthis
immutable component with the specifiedname
.-
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, withWidgetOverrides
-
Methods inherited from interface org.zkoss.stateless.sul.IDisable
isDisabled, withDisabled
-
Methods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndex
-
-
-
-
Field Detail
-
DEFAULT
static final ISelectbox DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Detail
-
getWidgetClass
default java.lang.String getWidgetClass()
Returns the client widget class.Default:
"zul.wgt.Selectbox"
- Specified by:
getWidgetClass
in interfaceIComponent<ISelectbox>
- Returns:
-
getName
@Nullable java.lang.String getName()
Returns the name of this component.Default:
null
.The name is used only to work with "legacy" Web application that handles user's request by servlets. It works only with HTTP/HTML-based browsers. It doesn't work with other kind of clients.
Don't use this method if your application is purely based on ZK's event-driven model.
-
withName
ISelectbox withName(java.lang.String name)
Returns a copy ofthis
immutable component with the specifiedname
.Sets the name of this component.
- Parameters:
name
- The name of this component.Default:
null
.- Returns:
- A modified copy of the
this
object
-
getChildren
java.util.List<java.lang.String> getChildren()
Returns the children of this component.
-
withChildren
ISelectbox withChildren(java.lang.String... children)
Returns a copy ofthis
immutable component with the specifiedchildren
.Sets the text children.
- Parameters:
children
- Text children.Default:
empty
.- Returns:
- A modified copy of the
this
object
-
withChildren
ISelectbox withChildren(java.lang.Iterable<java.lang.String> children)
Returns a copy ofthis
immutable component with the specifiedchildren
.Sets the text children.
- Parameters:
children
- A list of text child.Default:
empty
.- Returns:
- A modified copy of the
this
object
-
isMultiple
default boolean isMultiple()
Returns whether multiple selections are allowed.Default:
false
.
-
withMultiple
ISelectbox withMultiple(boolean multiple)
Returns a copy ofthis
immutable component with the specifiedmultiple
.Sets whether multiple selections are allowed.
- Parameters:
multiple
- Whether multiple selections are allowed.Default:
false
.- Returns:
- A modified copy of the
this
object
-
getMaxlength
default int getMaxlength()
Returns the maximal length of each item's label.
-
withMaxlength
ISelectbox withMaxlength(int maxlength)
Returns a copy ofthis
immutable component with the specifiedmaxlength
.Sets the maximal length of each item's label.
- Parameters:
maxlength
- The maximal length of each item's label.Default:
0
.- Returns:
- A modified copy of the
this
object
-
of
static ISelectbox of(java.lang.Iterable<java.lang.String> children)
Returns the instance with the given text children.- Parameters:
children
- The text children
-
of
static ISelectbox of(java.lang.String... children)
Returns the instance with the given text children.- Parameters:
children
- The text children
-
ofId
static ISelectbox ofId(java.lang.String id)
Returns the instance with the given id.- Parameters:
id
- The id to identify this component.
-
-