19 package org.turro.publication.zul.www;
21 import java.util.List;
22 import org.turro.i18n.I_;
23 import org.turro.publication.db.PublicationPU;
24 import org.zkoss.zul.Chart;
25 import org.zkoss.zul.SimplePieModel;
34 setTitle(
I_.
get(
"Author"));
38 setPaneColor(
"#ffffff");
42 private void createChart() {
44 SimplePieModel spm =
new SimplePieModel();
45 for(Object[] author : getAuthors()) {
46 spm.setValue((String) author[0], (Long) author[1]);
51 private List<Object[]> getAuthors() {
52 return new PublicationPU().getResultList(
53 "select p.author, count(p) from Publication as p group by p.author");
static String get(String msg)