Class IGridController<DataT,​RowT extends IRowBase>

  • All Implemented Interfaces:
    ItemController<DataT,​org.zkoss.zul.ListModel<DataT>,​IGrid,​RowT>

    public class IGridController<DataT,​RowT extends IRowBase>
    extends java.lang.Object
    implements ItemController<DataT,​org.zkoss.zul.ListModel<DataT>,​IGrid,​RowT>
    An IGrid controller to control any operation on the given model.

    Note: this class is not thread-safe, so when it's used in multi-threading environment, the developer should handle the threading issue.

    Author:
    katherine
    • Method Detail

      • of

        public static <D,​R extends IRowBaseIGridController<D,​R> of​(IGrid owner,
                                                                                 org.zkoss.zul.ListModel<D> model)
        Returns the controller instance with the given grid
        Parameters:
        owner - The controller to control with
        model - The list model to associate with the grid.
      • of

        public static <D,​R extends IRowBaseIGridController<D,​R> of​(IGrid owner,
                                                                                 org.zkoss.zul.ListModel<D> model,
                                                                                 CheckedFunction2<D,​java.lang.Integer,​R> renderer)
        Returns the controller instance with the given grid
        Parameters:
        owner - The controller to control with
        model - The list model to associate with the grid.
        renderer - The renderer of the list model.
      • of

        public static <D,​G,​F,​R extends IRowBaseIGridController<D,​R> of​(IGrid owner,
                                                                                                 org.zkoss.zul.GroupsModel<D,​G,​F> model)
        Returns the controller instance with the given grid
        Parameters:
        owner - The controller to control with
        model - The groups model to associate with the grid.
      • of

        public static <D,​G,​F,​R extends IRowBaseIGridController<D,​R> of​(IGrid owner,
                                                                                                 org.zkoss.zul.GroupsModel<D,​G,​F> model,
                                                                                                 CheckedFunction3<D,​java.lang.Integer,​org.zkoss.zul.ext.GroupingInfo,​R> renderer)
        Returns the controller instance with the given grid
        Parameters:
        owner - The controller to control with
        model - The groups model to associate with the grid.
        renderer - The renderer of the groups model.
      • setModel

        public void setModel​(org.zkoss.zul.GroupsModel<?,​?,​?> model)
        Sets the groups model for this controller to render.
        Parameters:
        model - The groups model.
      • setGroupsRenderer

        public void setGroupsRenderer​(CheckedFunction3<DataT,​java.lang.Integer,​org.zkoss.zul.ext.GroupingInfo,​RowT> renderer)
        Sets the groups renderer for GroupsModel
        Parameters:
        renderer - The renderer for GroupsModel.
      • getGroupsRenderer

        public CheckedFunction3<DataT,​java.lang.Integer,​org.zkoss.zul.ext.GroupingInfo,​RowT> getGroupsRenderer()
        Returns the groups renderer.

        Default: null