19 package org.turro.contacts.zul.organigram;
21 import org.turro.contacts.organigram.TargetArray;
22 import org.turro.contacts.organigram.TargetItem;
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.Hlayout;
28 import org.zkoss.zul.Space;
39 setSclass(
"z-valign-middle");
48 this.targetArray = targetArray;
60 private void addItems() {
61 getChildren().clear();
62 if(targetArray ==
null) {
65 for(TargetItem ti : targetArray) {
66 TargetSelectorItem tsi =
new TargetSelectorItem(ti);
70 final LastItemListbox lil =
new LastItemListbox();
71 lil.setMold(
"select");
72 lil.setObjectValue(targetArray.getLastItem());
73 lil.addEventListener(Events.ON_SELECT,
new EventListener<Event>() {
75 public void onEvent(Event event) throws Exception {
76 targetArray.setLastItem(lil.getObjectValue());
77 Events.postEvent(new Event(Events.ON_CHANGE, TargetSelector.this));
82 Space sep =
new Space();
85 TargetSelectorNewItem tsni =
new TargetSelectorNewItem();