18 package org.turro.activity;
20 import org.turro.command.CommandUtil;
21 import org.turro.contacts.Contact;
22 import org.turro.contacts.db.ContactsPU;
23 import org.turro.zkoss.grid.GroupExtended;
24 import org.turro.zkoss.grid.PagingGrid;
25 import org.zkoss.zk.ui.Component;
26 import org.zkoss.zul.Group;
27 import org.zkoss.zul.Label;
28 import org.zkoss.zul.Row;
29 import org.zkoss.zul.Rows;
38 private boolean canDelete =
true, onlyEntities =
false;
53 this.onlyEntities = onlyEntities;
62 for(Object o : rows.getChildren()) {
63 if(o instanceof Row) {
72 private void addColumns() {
75 private void addRows(Contact contact) {
77 if(rows !=
null) removeChild(rows);
83 String groupName =
null;
85 for(IParticipation ia : ParticipationCatchers.getParticipations(ContactsPU.getObjectPath(contact))) {
88 Component comp = CommandUtil.getLink(ia.getEntity());
90 row.appendChild(comp);
92 if(!ia.getCatcher().getDescription().equals(groupName)) {
93 Group group =
new GroupExtended(ia.getCatcher().getDescription());
94 rows.appendChild(group);
95 groupName = ia.getCatcher().getDescription();
97 rows.appendChild(row);
101 Label l =
new Label(ia.getDescription());
102 if(ia.isCanDelete()) {
103 l.setSclass(
"canDel");
105 l.setSclass(
"cannotDel");
109 if(!ia.getCatcher().getDescription().equals(groupName)) {
110 Group group =
new GroupExtended(ia.getCatcher().getDescription());
111 rows.appendChild(group);
112 groupName = ia.getCatcher().getDescription();
114 rows.appendChild(row);
118 canDelete = ia.isCanDelete();
void setContact(Contact contact)
void setOnlyEntities(boolean onlyEntities)
void setRowCount(int rows)