19 package org.turro.command;
21 import org.turro.string.Strings;
22 import org.turro.auth.Authentication;
23 import org.turro.entities.Entities;
24 import org.turro.entities.IElephantEntity;
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.zk.ui.ext.AfterCompose;
29 import org.zkoss.zul.A;
30 import org.zkoss.zul.Popup;
39 private boolean linkEntity =
true;
41 private int maxChars = 200;
42 private final ClickListener onclick =
new ClickListener();
44 class ClickListener
implements EventListener<Event> {
46 public void onEvent(Event event)
throws Exception {
64 this.linkEntity = linkEntity;
80 this.linkEntity = linkEntity;
88 this.maxChars = maxChars;
95 private void createComponents() {
96 removeEventListener(Events.ON_CLICK, onclick);
100 setLabel(Strings.truncateAndWarn(label, maxChars));
101 setTooltiptext(label);
104 addEventListener(Events.ON_CLICK, onclick);
116 super.setContext(popup);
static IContact getIContact()
void setMaxChars(int maxChars)
LabelControl(Object entity)
LabelControl(Object entity, boolean linkEntity)
void setEntity(Object entity)
void setContext(Popup popup)
void setLinkEntity(boolean linkEntity)
static IElephantEntity getController(String path)
boolean canEdit(IContact contact)