Author: tkuprevich
Date: 2008-07-07 11:38:16 -0400 (Mon, 07 Jul 2008)
New Revision: 9431
Modified:
trunk/test-applications/jsp/src/main/java/scrollableDataTable/ScrollableDataTable.java
Log:
Modified:
trunk/test-applications/jsp/src/main/java/scrollableDataTable/ScrollableDataTable.java
===================================================================
---
trunk/test-applications/jsp/src/main/java/scrollableDataTable/ScrollableDataTable.java 2008-07-07
14:56:16 UTC (rev 9430)
+++
trunk/test-applications/jsp/src/main/java/scrollableDataTable/ScrollableDataTable.java 2008-07-07
15:38:16 UTC (rev 9431)
@@ -191,10 +191,10 @@
public void addNewItem() {
if(dataLength < 0) dataLength = 0;
if(data.size() > dataLength)
- for(int i = dataLength; i < data.size();i--)
+ for(int i = data.size() - 1; i >= dataLength; i--)
data.remove(i);
else
- for(int i = data.size() + 1; i <= dataLength; i++){
+ for(int i = data.size(); i < dataLength; i++){
date.set(2008, 5, 14, 3, i);
data.add(new Data(i, "Text " + i, "Link " + i, "select"
+(i % 5), Data.statusIcon[i % 5], date.getTime()));
}