Package org.cyclop.web.components.pagination

Examples of org.cyclop.web.components.pagination.BootstrapPagingNavigator


      setObject(result.columns);
    }
  }

  private BootstrapPagingNavigator createPager(IPageableItems pageable) {
    BootstrapPagingNavigator pager = new BootstrapPagingNavigator("rowsPager", pageable, new PagerConfigurator() {

      @Override
      public void onItemsPerPageChanged(AjaxRequestTarget target, long newItemsPerPage) {
        UserPreferences prefs = um.readPreferences().setPagerEditorItems(newItemsPerPage);
        um.storePreferences(prefs);
        appendTableResizeJs(target);
      }

      @Override
      public long getInitialItemsPerPage() {
        return um.readPreferences().getPagerEditorItems();
      }
    }) {
      @Override
      protected void onAjaxEvent(AjaxRequestTarget target) {
        super.onAjaxEvent(target);
        appendTableResizeJs(target);
      }
    };
    resultTable.add(pager);
    pager.setCurrentPage(initPage);
    return pager;
  }
View Full Code Here


        populateRuntime(item, entry);
        populateQuery(item, entry);
      }
    };
    historyContainer.add(historyTable);
    pager = new BootstrapPagingNavigator("historyPager", historyTable, new PagerConfigurator() {

      @Override
      public void onItemsPerPageChanged(AjaxRequestTarget target, long newItemsPerPage) {
        UserPreferences prefs = um.readPreferences().setPagerHistoryItems(newItemsPerPage);
        um.storePreferences(prefs);
View Full Code Here

        populateRuntime(item, entry);
        populateQuery(item, entry);
      }
    };
    container.add(historyTable);
    final BootstrapPagingNavigator importResultPager = new BootstrapPagingNavigator("importResultPager",
        historyTable, new PagerConfigurator() {

          @Override
          public void onItemsPerPageChanged(AjaxRequestTarget target, long newItemsPerPage) {
            UserPreferences prefs = um.readPreferences().setPagerImportItems(newItemsPerPage);
            um.storePreferences(prefs);
          }

          @Override
          public long getInitialItemsPerPage() {
            return um.readPreferences().getPagerImportItems();
          }
        });
    container.add(importResultPager);
    model.registerOnChangeListener(o -> importResultPager.reset());
    return model;
  }
View Full Code Here

TOP

Related Classes of org.cyclop.web.components.pagination.BootstrapPagingNavigator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.