if (newNumberOfObjectsPerBatch!=null && newNumberOfObjectsPerBatch.intValue() != displayGroup().numberOfObjectsPerBatch()) { if (displayGroup()!=null) { if(log.isDebugEnabled()) log.debug("Setting db # of objects per batch to "+newNumberOfObjectsPerBatch); displayGroup().setNumberOfObjectsPerBatch(newNumberOfObjectsPerBatch.intValue());  if(log.isDebugEnabled()) log.debug("The batch index is being set to : "+ 1); displayGroup().setCurrentBatchIndex(1); } Object d2wcontext=valueForBinding("d2wContext"); if (d2wcontext!=null) { NSNotificationCenter.defaultCenter().postNotification("BatchSizeChanged", ERXConstant.integerForInt(newNumberOfObjectsPerBatch.intValue()), new NSDictionary(d2wcontext,"d2wContext")); } } newNumberOfObjectsPerBatch = null;
    public void appendToResponse(WOResponse response, WOContext context) {        if (displayGroup() != null  &&  ! displayGroup().hasMultipleBatches()) {            if (currentBatchIndex() != 0)                 setCurrentBatchIndex(ERXConstant.ZeroInteger);        }        super.appendToResponse(response, context);    }