Package org.primefaces.model

Examples of org.primefaces.model.LazyDataModel


  }

  void loadLazyData() {
    DataModel model = getDataModel();
    if(model instanceof LazyDataModel) {
      LazyDataModel lazyModel = (LazyDataModel) model;
      lazyModel.setPageSize(getRows());
      lazyModel.setWrappedData(lazyModel.fetchLazyData(getFirst(), getRows()));
    }
  }
View Full Code Here


        }
        ds.setRowIndex(-1);
    }
   
    protected void loadLazyData(DataScroller ds, int start, int size) {
        LazyDataModel lazyModel = (LazyDataModel) ds.getValue();
       
        if(lazyModel != null) {     
            List<?> data = lazyModel.load(start, size, null, null, null);
            lazyModel.setPageSize(size);
            lazyModel.setWrappedData(data);
        }
    }
View Full Code Here

    public void loadLazyData() {
        DataModel model = getDataModel();
       
        if(model instanceof LazyDataModel) {
            LazyDataModel lazyModel = (LazyDataModel) model;
            lazyModel.setPageSize(getRows());

            List<?> data = lazyModel.load(getFirst(), getRows(), resolveSortField(this.getValueExpression("sortBy")), convertSortOrder(), getFilters());

            lazyModel.setWrappedData(data);

            //Update paginator for callback
            if(this.isPaginator()) {
                RequestContext requestContext = RequestContext.getCurrentInstance();

                if(requestContext != null) {
                    requestContext.addCallbackParam("totalRecords", lazyModel.getRowCount());
                }
            }
        }
    }
View Full Code Here

            return null;
        }
    }

    public void clearLazyCache() {
        LazyDataModel model = (LazyDataModel) getDataModel();
        model.setWrappedData(null);
    }
View Full Code Here

  }
 
  void loadLazyData() {
    DataModel model = getDataModel();
    if(model instanceof LazyDataModel) {
      LazyDataModel lazyModel = (LazyDataModel) model;
      lazyModel.setPageSize(getRows());
      lazyModel.setWrappedData(lazyModel.fetchLazyData(getFirst(), getRows()));
    }
  }
View Full Code Here

  }

  void loadLazyData() {
    DataModel model = getDataModel();
    if(model instanceof LazyDataModel) {
      LazyDataModel lazyModel = (LazyDataModel) model;
      lazyModel.setPageSize(getRows());
      lazyModel.setWrappedData(lazyModel.fetchLazyData(getFirst(), getRows()));
    }
  }
View Full Code Here

TOP

Related Classes of org.primefaces.model.LazyDataModel

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.