1 16 package org.apache.myfaces.component.html.ext; 17 18 import java.util.ArrayList ; 19 import java.util.SortedMap ; 20 21 25 class _SerializableResultDataModel 26 extends _SerializableDataModel 27 { 28 30 public _SerializableResultDataModel(int first, int rows, javax.servlet.jsp.jstl.sql.Result result) 31 { 32 _first = first; 33 _rows = rows; 34 _rowCount = result.getRowCount(); 35 if (_rows <= 0) 36 { 37 _rows = _rowCount - first; 38 } 39 _list = new ArrayList (_rows); 40 SortedMap [] resultRows = result.getRows(); 41 for (int i = 0; i < _rowCount; i++) 42 { 43 _list.add(resultRows[_first + i]); 44 } 45 } 46 47 } 48 | Popular Tags |