18 package org.turro.dossier.zul.dossier;
20 import org.turro.action.Contacts;
21 import org.turro.attach.db.AttachPU;
22 import org.turro.attach.entity.Attachment;
23 import org.turro.dossier.entity.IssueComment;
24 import org.turro.elephant.util.DateFormats;
25 import org.turro.i18n.I_;
26 import org.turro.jpa.DaoTransaction;
27 import org.turro.plugin.contacts.IContact;
28 import org.turro.zkoss.label.LabelExtended;
29 import org.zkoss.zk.ui.event.Event;
30 import org.zkoss.zk.ui.event.EventListener;
31 import org.zkoss.zk.ui.event.Events;
32 import org.zkoss.zul.Filedownload;
33 import org.zkoss.zul.Hbox;
34 import org.zkoss.zul.Label;
35 import org.zkoss.zul.Row;
36 import org.zkoss.zul.Vbox;
46 super.setValue(value);
53 Vbox vbox =
new Vbox();
57 label.setSclass(
"participant");
58 vbox.appendChild(label);
61 label.setSclass(
"modification");
62 vbox.appendChild(label);
68 lext.setSclass(
"comment");
72 vbox.appendChild(lext);
74 Hbox hbox =
new Hbox();
75 hbox.setSclass(
"values");
76 boolean hasValues =
false;
79 label =
new Label(
I_.
get(
"Expenses"));
80 label.setSclass(
"caption");
81 hbox.appendChild(label);
83 label.setSclass(
"value");
84 hbox.appendChild(label);
89 label =
new Label(
I_.
get(
"Hours"));
90 label.setSclass(
"caption");
91 hbox.appendChild(label);
92 label =
new Label(ic.
getHours() +
"");
93 label.setSclass(
"value");
94 hbox.appendChild(label);
99 label =
new Label(
I_.
get(
"Price"));
100 label.setSclass(
"caption");
101 hbox.appendChild(label);
102 label =
new Label(ic.
getPrice() +
"");
103 label.setSclass(
"value");
104 hbox.appendChild(label);
109 vbox.appendChild(hbox);
115 Vbox vbox =
new Vbox();
121 Label label =
new Label(contact !=
null ? contact.
getName() : attachment.
getOwner());
122 label.setSclass(
"participant");
123 vbox.appendChild(label);
126 label.setSclass(
"modification");
127 vbox.appendChild(label);
133 label.setSclass(
"attachment");
134 label.setStyle(
"cursor:pointer");
135 label.addEventListener(Events.ON_CLICK,
new EventListener() {
138 public void onEvent(Event event)
throws Exception {
139 doDownload(attachment);
142 vbox.appendChild(label);
148 vbox.appendChild(lext);
153 private void doDownload(
Attachment attachment) {
155 attachment = transaction.saveObject(attachment);
AttachContent getAttachContent()
String getFileContentType()
void setValue(Object value)
static String get(String msg)
LabelExtended setWordWrap(int wordWrap)
void setValue(String value)