Package org.zkoss.stateless.state
Interface ItemController<Data,Model,P extends IComponent,Item>
-
- All Known Implementing Classes:
IBiglistboxController
,ICascaderController
,IChosenboxController
,IComboboxController
,IGridController
,ILinelayoutController
,IListboxController
,IOrganigramController
,IRadiogroupController
,ISearchboxController
,ISelectboxController
,IStepbarController
,ITabboxController
,ITreeController
public interface ItemController<Data,Model,P extends IComponent,Item>
An interface for controlling model to build items, such asListModel
.- Author:
- jumperchen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description P
build()
Returns the immutable instance that the controller to build withvoid
clear()
Clears all the rendered data.Model
getModel()
Returns the model, which is set through bysetModel(Object)
, or null.CheckedFunction2<Data,java.lang.Integer,Item>
getRenderer()
Returns the renderer, which is set through bysetRenderer(CheckedFunction2)
, or a default one which is depended on implementation.void
setModel(Model model)
Sets the given model to this controller.void
setRenderer(CheckedFunction2<Data,java.lang.Integer,Item> renderer)
Sets the renderer which is used to render each data ifgetModel()
is not null.
-
-
-
Method Detail
-
setModel
void setModel(@Nullable Model model)
-
getModel
@Nullable Model getModel()
Returns the model, which is set through bysetModel(Object)
, or null.
-
setRenderer
void setRenderer(CheckedFunction2<Data,java.lang.Integer,Item> renderer)
Sets the renderer which is used to render each data ifgetModel()
is not null.Note: calling this method after
build()
, you should invokebuild()
again to take effect to replace the current one at client.
For example,uiAgent.replaceWith(locator, itemController.build());
Default:
null
, or depended on the implementation
-
getRenderer
CheckedFunction2<Data,java.lang.Integer,Item> getRenderer()
Returns the renderer, which is set through bysetRenderer(CheckedFunction2)
, or a default one which is depended on implementation.
-
build
P build()
Returns the immutable instance that the controller to build with
-
clear
void clear()
Clears all the rendered data.
-
-