18 package org.turro.contacts.zul.contact;
20 import java.util.Collection;
21 import java.util.stream.Collectors;
22 import org.turro.contacts.Contact;
23 import org.turro.contacts.social.SocialGroupListbox;
24 import org.turro.contacts.social.SocialGroupValue;
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.zul.Bandbox;
29 import org.zkoss.zul.Bandpopup;
52 this.contact = contact;
60 private void addPopup() {
61 Bandpopup popup =
new Bandpopup();
62 popup.setWidth(
"400px");
65 listbox.addEventListener(Events.ON_SELECT,
new EventListener() {
67 public void onEvent(Event event)
throws Exception {
72 popup.appendChild(listbox);
75 private void updateText() {
76 setText(listbox.
getObjectValues().stream().map(sgv -> sgv.getName()).collect(Collectors.joining(
",")));