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.entities.Entities;
25 import org.turro.i18n.I_;
26 import org.zkoss.zk.ui.event.Event;
27 import org.zkoss.zk.ui.event.EventListener;
28 import org.zkoss.zk.ui.event.Events;
29 import org.zkoss.zul.Toolbarbutton;
35 @ElephantPlugin(label=
"log-button")
38 private String generatorPath, entityPath;
50 this.generatorPath = generatorPath;
56 this.entityPath = entityPath;
60 private boolean _initialized;
62 private void initializeButton() {
63 if(!Strings.isBlank(generatorPath)) {
64 setImage(
"/_zul/images/log_contact.png");
65 setTooltiptext(
I_.
get(
"Log") +
": " +
I_.
get(
"Contact"));
67 setImage(
"/_zul/images/log.png");
68 setTooltiptext(I_.get(
"Log") +
": " + I_.get(
"Entity"));
72 addEventListener(Events.ON_CLICK,
new EventListener() {
74 public void onEvent(Event event)
throws Exception {
75 WwwMenu.showLog(generatorPath, entityPath);
static IElephantEntity getController(String path)
static String get(String msg)