18 package org.turro.contacts.zul.proposal;
20 import org.turro.contacts.Contact;
21 import org.turro.contacts.proposal.GenericAttribute;
22 import org.zkoss.zk.ui.event.Event;
23 import org.zkoss.zk.ui.event.EventListener;
24 import org.zkoss.zk.ui.event.Events;
25 import org.zkoss.zul.Checkbox;
26 import org.zkoss.zul.Detail;
27 import org.zkoss.zul.Hbox;
28 import org.zkoss.zul.Include;
29 import org.zkoss.zul.Label;
30 import org.zkoss.zul.Row;
41 this.attribute = attribute;
47 Events.postEvent(
new Event(Events.ON_SELECT, pg));
53 Hbox hbox =
new Hbox();
54 hbox.setAlign(
"center");
57 final Checkbox active =
new Checkbox();
58 active.setChecked(attribute.
isActive());
59 active.addEventListener(Events.ON_CHECK,
new EventListener() {
61 public void onEvent(Event event)
throws Exception {
65 hbox.appendChild(active);
67 l.setSclass(
"attrName");
70 l.setSclass(
"attrValue");
74 private void addDetail() {
75 Detail detail =
new Detail();
78 Include include =
new Include(
"/WEB-INF/_zul/contact/proposalRow.zul");
79 include.setDynamicProperty(
"attribute", attribute);
80 include.setDynamicProperty(
"row",
this);
81 detail.appendChild(include);
83 detail.setOpen(attribute.
getRelated().size() > 1);