Posted Monday, May 3, 2004 @ 10:48:35
I will update the api documentation about how to use keysSortOrder array.
I have fixed the code to use this sort array below.
public void setBoundSql(int col, String boundSql)
{
Statement stmt = null;
ResultSet rs = null;
stmt = dbTable.getConnection().createStatement();
rs = stmt.executeQuery(boundSql);
Vector sortVector = new Vector();
Hashtable hash = new Hashtable();
while(rs.next())
{
String key = rs.getString(1);
sortVector.addElement(key);
hash.put(key, rs.getString(2));
}
dbTable.setCellComponent(dbTable.getColumn(col), Column.COMBOBOX_CELL, hash, sortVector.toArray(), true);
rs.close();
stmt.close();
}