- port to webui
This commit is contained in:
parent
18f7930c24
commit
0feb9b4f2d
|
@ -445,7 +445,7 @@ public class WListItemRenderer implements ListitemRenderer, EventListener, Listi
|
||||||
ListHeader header = null;
|
ListHeader header = null;
|
||||||
|
|
||||||
String headerText = headerValue.toString();
|
String headerText = headerValue.toString();
|
||||||
if (m_headers.size() <= headerIndex)
|
if (m_headers.size() <= headerIndex || m_headers.get(headerIndex) == null)
|
||||||
{
|
{
|
||||||
Comparator<Object> ascComparator = getColumnComparator(true, headerIndex);
|
Comparator<Object> ascComparator = getColumnComparator(true, headerIndex);
|
||||||
Comparator<Object> dscComparator = getColumnComparator(false, headerIndex);
|
Comparator<Object> dscComparator = getColumnComparator(false, headerIndex);
|
||||||
|
@ -494,6 +494,26 @@ public class WListItemRenderer implements ListitemRenderer, EventListener, Listi
|
||||||
return header;
|
return header;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* set custom list header
|
||||||
|
* @param index
|
||||||
|
* @param header
|
||||||
|
*/
|
||||||
|
public void setListHeader(int index, ListHeader header) {
|
||||||
|
int size = m_headers.size();
|
||||||
|
if (size <= index) {
|
||||||
|
while (size <= index) {
|
||||||
|
if (size == index)
|
||||||
|
m_headers.add(header);
|
||||||
|
else
|
||||||
|
m_headers.add(null);
|
||||||
|
size++;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else
|
||||||
|
m_headers.set(index, header);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Obtain the comparator for a given column.
|
* Obtain the comparator for a given column.
|
||||||
*
|
*
|
||||||
|
|
|
@ -22,6 +22,7 @@ import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
@ -102,7 +103,7 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis
|
||||||
* @param model The data model to assign to the table
|
* @param model The data model to assign to the table
|
||||||
* @param columnNames The names of the table columns
|
* @param columnNames The names of the table columns
|
||||||
*/
|
*/
|
||||||
public void setData(ListModelTable model, Vector< ? extends String> columnNames)
|
public void setData(ListModelTable model, List< ? extends String> columnNames)
|
||||||
{
|
{
|
||||||
// instantiate our custom row renderer
|
// instantiate our custom row renderer
|
||||||
WListItemRenderer rowRenderer = new WListItemRenderer(columnNames);
|
WListItemRenderer rowRenderer = new WListItemRenderer(columnNames);
|
||||||
|
|
Loading…
Reference in New Issue