    public void paginate(ActionEvent action) {
        PaginatorActionEvent pEvent = (PaginatorActionEvent) action;
        DataverseGrouping grouping = (DataverseGrouping) itemBeans.get(0);
        grouping.setIsPopulated(false);
        if (DataPaginator.FACET_FIRST.equals(pEvent.getScrollerfacet())) {
            grouping.setFirstRow(0);
            grouping.setPageAction(true);
            grouping.getManagedDataModel();
        } else if (DataPaginator.FACET_PREVIOUS.equals(pEvent.getScrollerfacet())) {
            grouping.setFirstRow(Math.max( grouping.getFirstRow() - 10, 0 ) );
            grouping.setPageAction(true);
            grouping.getManagedDataModel();
        } else if (DataPaginator.FACET_NEXT.equals(pEvent.getScrollerfacet())) {
            checkForwardPaging(grouping,10);
        } else if (DataPaginator.FACET_FAST_REWIND.equals(pEvent.getScrollerfacet())) {
            grouping.setFirstRow(Math.max( grouping.getFirstRow() - 30, 0 ) );
            grouping.setPageAction(true);
            grouping.getManagedDataModel();
        } else if (DataPaginator.FACET_FAST_FORWARD.equals(pEvent.getScrollerfacet())) {
            checkForwardPaging(grouping,30);
        } else if (DataPaginator.FACET_LAST.equals(pEvent.getScrollerfacet())) {
            grouping.setFirstRow(grouping.getDataModelRowCount() - (grouping.getDataModelRowCount() % 10));
            grouping.setPageAction(true);
            grouping.getManagedDataModel();
        } else { 
            System.out.println("The page event is " + pEvent.getPageIndex());
            int page = pEvent.getPageIndex();
            grouping.setFirstRow((page - 1) * 10);
            grouping.setPageAction(true);
            grouping.getManagedDataModel();
        }
    }

    public void paginate(ActionEvent action) {
        PaginatorActionEvent pEvent = (PaginatorActionEvent) action;
        DataverseGrouping grouping = (DataverseGrouping) itemBeans.get(0);
        grouping.setIsPopulated(false);
        if (DataPaginator.FACET_FIRST.equals(pEvent.getScrollerfacet())) {
            grouping.setFirstRow(0);
            grouping.setPageAction(true);
            grouping.getManagedDataModel();
        } else if (DataPaginator.FACET_PREVIOUS.equals(pEvent.getScrollerfacet())) {
            grouping.setFirstRow(Math.max( grouping.getFirstRow() - 10, 0 ) );
            grouping.setPageAction(true);
            grouping.getManagedDataModel();
        } else if (DataPaginator.FACET_NEXT.equals(pEvent.getScrollerfacet())) {
            checkForwardPaging(grouping,10);
        } else if (DataPaginator.FACET_FAST_REWIND.equals(pEvent.getScrollerfacet())) {
            grouping.setFirstRow(Math.max( grouping.getFirstRow() - 30, 0 ) );
            grouping.setPageAction(true);
            grouping.getManagedDataModel();
        } else if (DataPaginator.FACET_FAST_FORWARD.equals(pEvent.getScrollerfacet())) {
            checkForwardPaging(grouping,30);
        } else if (DataPaginator.FACET_LAST.equals(pEvent.getScrollerfacet())) {
            int dvRemainder = grouping.getDataModelRowCount() % 10;
            grouping.setFirstRow( grouping.getDataModelRowCount() - (dvRemainder != 0 ? dvRemainder : 10) );
            grouping.setPageAction(true);
            grouping.getManagedDataModel();
        } else { 
            System.out.println("The page event is " + pEvent.getPageIndex());
            int page = pEvent.getPageIndex();
            grouping.setFirstRow((page - 1) * 10);
            grouping.setPageAction(true);
            grouping.getManagedDataModel();
        }
    }
