18 package org.turro.action;
20 import java.util.ArrayList;
21 import java.util.List;
22 import org.turro.command.Context;
23 import org.zkoss.zk.ui.event.Event;
24 import org.zkoss.zk.ui.event.EventListener;
25 import org.zkoss.zk.ui.event.Events;
26 import org.zkoss.zk.ui.ext.AfterCompose;
27 import org.zkoss.zul.Menuitem;
28 import org.zkoss.zul.Menupopup;
34 public class ActionMenu extends Menupopup implements AfterCompose {
36 protected List<AbstractAction>
actions =
new ArrayList<>();
52 getChildren().clear();
54 Menuitem mi =
new Menuitem();
55 mi.setLabel(aa.getLabel());
56 mi.setImage(aa.getImage());
57 mi.addEventListener(
Events.ON_CLICK,
new EventListener() {
59 public void onEvent(Event event)
throws Exception {
60 Context ctx =
new Context();