Package org.zkoss.zul.impl
Interface DataLoader
-
- All Known Implementing Classes:
GridDataLoader
,ListboxDataLoader
,LiveGridDataLoader
,LiveListboxDataLoader
public interface DataLoader
DataLoader is used withGrid
,Listbox
to handle data loading from model to server and then to client side.- Since:
- 5.0.0
- Author:
- henrichen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
doGroupsDataChange(GroupsDataEvent event)
Handle event when GroupsDataEvent is fired from owner component.void
doListDataChange(ListDataEvent event)
Handle event when ListDataEvent is fired from owner component.int
getLimit()
Returns the required visible limit size of the current loaded data chunk to be shown on the screen.int
getOffset()
Returns the requested visible offset of the current loaded data chunk.Component
getOwner()
Returns the associated owner component of this DataLoader.java.lang.Object
getRealRenderer()
Return the renderer to do rendering.int
getTotalSize()
Returns the total size of the data.void
init(Component owner, int offset, int limit)
Callback from the owner component and give a chance to initialize things.void
reset()
Callback from the owner component and give a chance to reset things.void
setLoadAll(boolean b)
Sets whether to always load all items from ListModel.void
syncModel(int offset, int limit)
Synchronizes the owner component to be consistent with the specified model.void
updateModelInfo()
Used to update some extra control information to the client.
-
-
-
Method Detail
-
init
void init(Component owner, int offset, int limit)
Callback from the owner component and give a chance to initialize things.- Parameters:
owner
- the owner component of this DataLoader.
-
reset
void reset()
Callback from the owner component and give a chance to reset things.
-
getOwner
Component getOwner()
Returns the associated owner component of this DataLoader.
-
getOffset
int getOffset()
Returns the requested visible offset of the current loaded data chunk.- Returns:
- the requested visible offset of the current loaded data chunk.
-
getLimit
int getLimit()
Returns the required visible limit size of the current loaded data chunk to be shown on the screen.- Returns:
- the required visible limit size of the current loaded data chunk to be shown on the screen.
-
doListDataChange
void doListDataChange(ListDataEvent event)
Handle event when ListDataEvent is fired from owner component.
-
doGroupsDataChange
void doGroupsDataChange(GroupsDataEvent event)
Handle event when GroupsDataEvent is fired from owner component.- Parameters:
event
- the corresponding GroupsDataEvent- Since:
- 8.0.4
-
getTotalSize
int getTotalSize()
Returns the total size of the data.- Returns:
- the total size of the data.
-
syncModel
void syncModel(int offset, int limit)
Synchronizes the owner component to be consistent with the specified model.- Parameters:
offset
- the starting index of the range to do data synchronize.limit
- the size of the range to do data synchronize. -1 means the current range.
-
updateModelInfo
void updateModelInfo()
Used to update some extra control information to the client.
-
getRealRenderer
java.lang.Object getRealRenderer()
Return the renderer to do rendering.
-
setLoadAll
void setLoadAll(boolean b)
Sets whether to always load all items from ListModel.
-
-