Class Paginator

java.lang.Object
org.apache.ofbiz.widget.renderer.Paginator

public final class Paginator extends Object
Utility methods for handling list pagination.
  • Constructor Details

    • Paginator

      public Paginator()
  • Method Details

    • getActualPageSize

      public static int getActualPageSize(Map<String,Object> context)
    • getHighIndex

      public static int getHighIndex(Map<String,Object> context)
    • getListLimits

      public static void getListLimits(ModelForm modelForm, Map<String,Object> context, Object entryList)
    • getListSize

      public static int getListSize(Map<String,Object> context)
    • getLowIndex

      public static int getLowIndex(Map<String,Object> context)
    • getViewIndex

      public static int getViewIndex(ModelForm modelForm, Map<String,Object> context)
    • getViewSize

      public static int getViewSize(ModelForm modelForm, Map<String,Object> context)
    • preparePager

      public static void preparePager(ModelForm modelForm, Map<String,Object> context)
    • getViewIndex

      public static Integer getViewIndex(Map<String,? extends Object> context, String viewIndexName)
      Parameters:
      context - Map
      viewIndexName -
      Returns:
      value of viewIndexName in context map (as an int) or return 0 as default
    • getViewIndex

      public static Integer getViewIndex(Map<String,? extends Object> context, String viewIndexName, int defaultValue)
      Parameters:
      context -
      viewIndexName -
      defaultValue -
      Returns:
      value of viewIndexName in context map (as an int) or return defaultValue
    • getViewSize

      public static Integer getViewSize(Map<String,? extends Object> context, String viewSizeName)
      Parameters:
      context -
      viewSizeName -
      Returns:
      value of viewSizeName in context map (as an int) or return default value from widget.properties