listItem.add(headingLink);
String label = ch.isField() ? ch.getLabel() : localize("item_list." + ch.getName());
headingLink.add(new Label("heading", label));
if (ch.getNameText().equals(itemSearch.getSortFieldName())) {
String order = itemSearch.isSortDescending() ? "order-down" : "order-up";
listItem.add(new SimpleAttributeModifier("class", order));
}
}
};
add(headings);
//======================== ITEMS =======================================
final long selectedItemId = itemSearch.getSelectedItemId();
final SimpleAttributeModifier sam = new SimpleAttributeModifier("class", "alt");
ListView itemList = new ListView("itemList", itemListModel) {
protected void populateItem(ListItem listItem) {
// cast to AbstactItem - show history may be == true
final AbstractItem item = (AbstractItem) listItem.getModelObject();
if (selectedItemId == item.getId()) {
listItem.add(new SimpleAttributeModifier("class", "selected"));
} else if(listItem.getIndex() % 2 == 1) {
listItem.add(sam);
}
final boolean showHistory = itemSearch.isShowHistory();