Returns: range-based (not absolute) index within the current range
/**
* This method is for use with UI Table addRows buttons that require the
* addition of multiple rows; given a RowIterator (such as a VO) and the
* number of rows the caller needs to add, this method figures out where
* the caller should start adding rows in order to comply with the BLAF
* standard that newly added rows should go into the bottom of the current
* table range (which is the same as the RowIterator range if things are
* set up properly), pushing rows into the next range if necessary
*
* Returns: range-based (not absolute) index within the current range
*/
public static int getStartIndexForMultiInsert(RowIterator rowIt, int numRowsToAdd)
{
int numRowsInRange = rowIt.getRowCountInRange();
int rangeSize = rowIt.getRangeSize();
int firstIndexAtWhichToAdd = 0;
int numOpenSlotsInRange = (rangeSize - numRowsInRange); if (rowIt.getRangeSize() < rangeSize)
{
rowIt.setRangeSize(rangeSize);
} if (numOpenSlotsInRange < numRowsToAdd)
{
firstIndexAtWhichToAdd = rangeSize - numRowsToAdd;
}
else
{
firstIndexAtWhichToAdd = numRowsInRange;
} return firstIndexAtWhichToAdd;
} 调用:
int indexForRowInserts = getStartIndexForMultiInsert(vo, 1);
vo.insertRowAtRangeIndex(indexForRowInserts,row);
Returns: range-based (not absolute) index within the current range的更多相关文章
- .NET中使用GridView控件输入数据时出现“ Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"的问题
		
在.NET中使用GridView控件的在线编辑数据时,出现了“ Index was out of range. Must be non-negative and less than the size ...
 - Index was out of range
		
Index was out of range. Must be non-negative and less than the size of the collection. Parameter nam ...
 - IUrlHelper   ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.  Parameter name: index
		
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of ...
 - 【C#】【MySQL】【GridView】删除出现Parameter index is out of range
		
[编程语言]C# [数据库]MySQL [控件]GridView [问题描述]GridView控件中自带[删除],[编辑],[选择],三个按钮[编辑],[选择]正常使用,但是在使用删除时,却报错Par ...
 - 关于 NPOI 报 Invalid column index (256). Allowable column range for BIFF8 is (0..255) or ('A'..'IV') 错误的解决办法
		
当看到这个错误的时候,网上搜索可以会有些说列数有限制之类的说法,这个说法是相对于 Office 2003 的,在 Office 2007 之前,最多只可以创建 列:在 Office 2007 之后, ...
 - 向多页TABLE中插入数据时,新增行总是在当前页的最后一行
		
CODE IN CO OATableBean table = (OATableBean)webBean.findChildRecursive("LineTable"); int n ...
 - python文件读书笔记
		
一.打开文件 1 f=open('text.txt',r) 二.读取文件 print(f.read) 三.关闭文件 f.close() 比较好用的是运用with with open('text.tx ...
 - 吴裕雄 python神经网络 水果图片识别(3)
		
import osimport kerasimport timeimport numpy as npimport tensorflow as tffrom random import shufflef ...
 - 吴裕雄 python神经网络 水果图片识别(1)
		
import osimport numpy as npimport matplotlib.pyplot as pltfrom skimage import color,data,transform,i ...
 
随机推荐
- 设计模式-01-MVC
			
概述 Model-View-Controller(MVC),即模型-视图-控制器. MVC将软件系统分成三大部分:Model,View,Controller,三个部分通过某种机制通信 M.V.C的职能 ...
 - OC语言-04-OC语言-核心语法
			
一.点语法 1> 基本使用 点语法本质上是set方法/get方法的调用 2> 使用注意 若出现在赋值操作符的右边,在执行时会转换成get方法 若出现在赋值操作符的左边,在执行时会转换成se ...
 - java网络---基本web概念
			
首先需要搞清楚web中的3个关键概念. 一.HTTP,HTML,URL. HTML 全称是Hypertext Markup Language,是用来描述一个网页的语言.或者说,该语言是用来描述网页的“ ...
 - 《ASP.NET MVC 5 框架揭秘》
			
<ASP.NET MVC 5 框架揭秘> 基本信息 作者: 蒋金楠 出版社:电子工业出版社 ISBN:9787121237812 上架时间:2014-8-1 出版日期:2014 年8月 开 ...
 - spring中的 classpath* 存在可移植性问题
			
classpath* 的可移植性问题,许多人都应该遇到过了.下面就是一个例子(使用的是spring4.1.5和mybatis3.2.8): <bean id="sqlSessionFa ...
 - 使用backbone.js、zepto.js和trigger.io开发HTML5 App
			
为了力求运行速度快.响应迅即,我们推荐使用backbone.js和zepto.js. 为了让这个过程更有意思,我们开发了一个小小的示例项目,使用CSS重置样式.Backbone.js和带转场效果的几个 ...
 - 在matlab2015b中配置vlfeat-0.9.18
			
参考链接: 1.http://cnyubin.com/?p=85 2.http://www.cnblogs.com/woshitianma/p/3872939.html ...
 - Post-office 树状数组
			
Post office 题目描述 There are N(N<=1000) villages along a straight road, numbered from 1 to N for si ...
 - pushd
			
# MAN 手册原文: pushd [-n] [+n] [-n] pushd [-n] [dir] Adds a directory to ...
 - MSDE简介
			
MSDE的全程是Microsoft SQL Server Desktop Engine,它是一个基于 SQL Server 核心技术构建的数据引擎.MSDE 2000 支持单处理器和双处理器,是面向小 ...