Example usage for org.springframework.web.bind WebDataBinder getAutoGrowCollectionLimit

List of usage examples for org.springframework.web.bind WebDataBinder getAutoGrowCollectionLimit

Introduction

In this page you can find the example usage for org.springframework.web.bind WebDataBinder getAutoGrowCollectionLimit.

Prototype

public int getAutoGrowCollectionLimit() 

Source Link

Document

Return the current limit for array and collection auto-growing.

Usage

From source file:org.dspace.EDMExport.controller.homeController.java

/**
 * Mtodo para el listado de los tems que nos aumenta el nmero que podemos unir al enviarlos por POST
 * //from  www  .  ja  va 2 s .c  o m
 * @param dataBinder objeto WebDataBinder con el objeto a unir a nuestra variable
 */
@InitBinder("listItems")
public void initBinder(WebDataBinder dataBinder) {
    logger.debug("homeController.initBinder size: " + dataBinder.getAutoGrowCollectionLimit());
    int newSize = edmExportServiceListItems.getMapItemsSubmit().size() + 1;
    logger.debug("homeController.initBinder ItemsSubmitsize: " + newSize);
    if (dataBinder.getAutoGrowCollectionLimit() < newSize) {
        dataBinder.setAutoGrowCollectionLimit(newSize);
        logger.debug("homeController.resizeAutoGrowCollectionLimit new size: " + newSize);
    }
}