18 package org.turro.dossier.zul.dossier;
20 import org.turro.dossier.dossier.DossierActivitySet;
21 import org.turro.dossier.entity.Dossier;
22 import org.turro.dossier.entity.Issue;
23 import org.turro.dossier.entity.IssueComment;
24 import org.turro.dossier.zul.issue.IssueDetailRow;
25 import org.turro.i18n.I_;
26 import org.turro.zkoss.grid.GroupExtended;
27 import org.turro.zkoss.grid.PagingGrid;
28 import org.zkoss.zul.Column;
29 import org.zkoss.zul.Columns;
30 import org.zkoss.zul.Group;
31 import org.zkoss.zul.Rows;
49 private void addColumns() {
50 Columns cols =
new Columns();
51 cols.setSizable(
true);
52 cols.setMenupopup(
"auto");
55 Column col =
new Column(
I_.
get(
"Modification"));
56 col.setWidth(
"180px");
57 cols.appendChild(col);
58 col =
new Column(
I_.
get(
"Comment"));
59 cols.appendChild(col);
62 private void addRows(Dossier dossier) {
64 if(rows !=
null) removeChild(rows);
69 DossierActivitySet ids =
new DossierActivitySet(dossier);
73 Issue lastIssue =
null;
75 for(Object obj : ids) {
76 if(obj instanceof IssueComment) {
77 IssueComment c = (IssueComment) obj;
78 if(lastIssue ==
null || !c.getIssue().getId().equals(lastIssue.getId())) {
79 lastIssue = c.getIssue();
80 Group group =
new GroupExtended(
"#" + lastIssue.getId() +
" " + lastIssue.getDescription());
81 rows.appendChild(group);
84 IssueDetailRow row =
new IssueDetailRow(lastIssue);
86 rows.appendChild(row);
void setDossier(Dossier dossier)
static String get(String msg)
void setRowCount(int rows)