19 package org.turro.documentation.model;
21 import java.util.List;
22 import org.turro.file.Document;
23 import org.turro.file.FileWrapper;
24 import org.zkoss.zk.ui.event.Events;
25 import org.zkoss.zk.ui.ext.AfterCompose;
26 import org.zkoss.zul.A;
27 import org.zkoss.zul.Caption;
28 import org.zkoss.zul.Groupbox;
29 import org.zkoss.zul.Hlayout;
30 import org.zkoss.zul.Label;
31 import org.zkoss.zul.Vlayout;
39 private final String caption;
40 private final List<Document> documents;
43 this.caption = caption;
44 this.documents = documents;
49 appendChild(
new Caption(caption));
50 Vlayout vl =
new Vlayout();
51 for(Document doc : documents) {
52 Hlayout hl =
new Hlayout();
53 hl.appendChild(
new Label(doc.name()));
55 link.setIconSclass(
"z-icon-download");
56 link.addEventListener(Events.ON_CLICK, (event) -> {
57 new FileWrapper(doc.document()).download();
DownloadDocuments(String caption, List< Document > documents)