19 package org.turro.log;
21 import org.turro.string.Strings;
22 import org.turro.annotation.ElephantPlugin;
23 import org.turro.elephant.zul.menu.WwwMenu;
24 import org.turro.i18n.I_;
25 import org.zkoss.zk.ui.event.Event;
26 import org.zkoss.zk.ui.event.EventListener;
27 import org.zkoss.zk.ui.event.Events;
28 import org.zkoss.zul.A;
34 @ElephantPlugin(label=
"log-anchor")
37 private String generatorPath, entityPath;
41 this.generatorPath = generatorPath;
47 this.entityPath = entityPath;
51 private boolean _initialized;
53 private void initializeButton() {
54 if(!Strings.isBlank(generatorPath)) {
55 setImage(
"/_zul/images/log_contact.png");
56 setTooltiptext(
I_.
get(
"Log") +
": " +
I_.
get(
"Contact"));
58 setImage(
"/_zul/images/log.png");
59 setTooltiptext(I_.get(
"Log") +
": " + I_.get(
"Entity"));
63 addEventListener(Events.ON_CLICK,
new EventListener() {
65 public void onEvent(Event event)
throws Exception {
66 WwwMenu.showLog(generatorPath, entityPath);
static String get(String msg)
void setGeneratorPath(String generatorPath)
void setEntityPath(String entityPath)