18 package org.turro.contacts.social;
20 import java.util.List;
21 import org.turro.html.Colors;
22 import org.turro.i18n.I_;
23 import org.zkoss.zul.Listcell;
24 import org.zkoss.zul.Listgroup;
25 import org.zkoss.zul.Listgroupfoot;
26 import org.zkoss.zul.Listitem;
27 import org.zkoss.zul.ListitemRenderer;
36 public void render(Listitem listitem, Object obj,
int index)
throws Exception {
37 if (listitem instanceof Listgroup) {
38 List list = (List) obj;
41 listitem.setValue(obj);
42 }
else if (listitem instanceof Listgroupfoot) {
43 listitem.setLabel(
"Total " + obj +
" items");
46 listitem.setLabel(data.
getName());
47 ((Listcell) listitem.getChildren().iterator().next())
49 listitem.setStyle(
"color:" + Colors.cssByName(data.
getType().
getColor()));
50 listitem.setValue(data);
static String byKey(String key)