19 package org.turro.crm.zul.activity;
21 import org.turro.crm.entity.Customer;
22 import org.turro.crm.entity.SaleProspect;
23 import org.turro.crm.entity.Vendor;
24 import org.turro.crm.zul.menu.CrmMenu;
25 import org.turro.elephant.util.Images;
26 import org.turro.i18n.I_;
27 import org.zkoss.zk.ui.event.Event;
28 import org.zkoss.zk.ui.event.EventListener;
29 import org.zkoss.zk.ui.event.Events;
30 import org.zkoss.zk.ui.ext.AfterCompose;
31 import org.zkoss.zul.Toolbarbutton;
39 private Object entity;
48 setTooltiptext(
I_.
get(
"Activity"));
49 addEventListener(Events.ON_CLICK,
new EventListener<Event>() {
51 public void onEvent(Event event) throws Exception {
52 if(entity instanceof Vendor) {
53 CrmMenu.showActivity((Vendor) entity, null, null);
54 } else if(entity instanceof Customer) {
55 CrmMenu.showActivity(null, (Customer) entity, null);
56 } else if(entity instanceof SaleProspect) {
57 CrmMenu.showActivity(null, null, (SaleProspect) entity);
static String getImage(String image)
static String get(String msg)