Interface DataLoader

All Known Implementing Classes:
GridDataLoader, ListboxDataLoader

public interface DataLoader
DataLoader is used with Grid, Listbox to handle data loading from model to server and then to client side.
Since:
5.0.0
Author:
henrichen
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Handle event when GroupsDataEvent is fired from owner component.
    void
    Handle event when ListDataEvent is fired from owner component.
    int
    Returns the required visible limit size of the current loaded data chunk to be shown on the screen.
    int
    Returns the requested visible offset of the current loaded data chunk.
    org.zkoss.zk.ui.Component
    Returns the associated owner component of this DataLoader.
    Return the renderer to do rendering.
    int
    Returns the total size of the data.
    void
    init(org.zkoss.zk.ui.Component owner, int offset, int limit)
    Callback from the owner component and give a chance to initialize things.
    void
    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
    Used to update some extra control information to the client.
  • Method Details

    • 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

      Object getRealRenderer()
      Return the renderer to do rendering.
    • setLoadAll

      void setLoadAll(boolean b)
      Sets whether to always load all items from ListModel.