Package org.zkoss.zul.impl
Interface DataLoader
-
- All Known Implementing Classes:
GridDataLoader,ListboxDataLoader
public interface DataLoaderDataLoader is used withGrid,Listboxto 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 voiddoGroupsDataChange(GroupsDataEvent event)Handle event when GroupsDataEvent is fired from owner component.voiddoListDataChange(ListDataEvent event)Handle event when ListDataEvent is fired from owner component.intgetLimit()Returns the required visible limit size of the current loaded data chunk to be shown on the screen.intgetOffset()Returns the requested visible offset of the current loaded data chunk.org.zkoss.zk.ui.ComponentgetOwner()Returns the associated owner component of this DataLoader.java.lang.ObjectgetRealRenderer()Return the renderer to do rendering.intgetTotalSize()Returns the total size of the data.voidinit(org.zkoss.zk.ui.Component owner, int offset, int limit)Callback from the owner component and give a chance to initialize things.voidreset()Callback from the owner component and give a chance to reset things.voidsetLoadAll(boolean b)Sets whether to always load all items from ListModel.voidsyncModel(int offset, int limit)Synchronizes the owner component to be consistent with the specified model.voidupdateModelInfo()Used to update some extra control information to the client.
-
-
-
Method Detail
-
init
void init(org.zkoss.zk.ui.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
org.zkoss.zk.ui.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.
-
-