66 for(
final CustomerOwner co : customer.
getOwnedBy()) {
67 final Row row =
new Row();
69 rows.appendChild(row);
71 Vbox vbox =
new Vbox();
72 row.appendChild(vbox);
75 Hbox hbox =
new Hbox();
76 vbox.appendChild(hbox);
78 final VendorCombobox vendor =
new VendorCombobox();
79 vendor.setObjectValue(co.getVendor());
80 vendor.addEventListener(Events.ON_CHANGE,
new EventListener() {
82 public void onEvent(Event event)
throws Exception {
83 co.setVendor(vendor.getObjectValue());
84 co.setOwningDate(
new Date());
87 hbox.appendChild(vendor);
89 final Image img =
new Image(
"/_zul/images/delete.png");
90 img.setStyle(
"cursor:pointer");
91 img.addEventListener(Events.ON_CLICK,
new EventListener() {
93 public void onEvent(Event event)
throws Exception {
94 Messages.confirmDeletion().show(() -> {
100 hbox.appendChild(img);
102 final FormulaListbox comission =
new FormulaListbox();
103 comission.setFormulaType(FormulaType.FORMULA_COMISSION);
104 comission.setObjectValue(co.getComission());
105 comission.addEventListener(Events.ON_SELECT,
new EventListener() {
107 public void onEvent(Event event)
throws Exception {
108 co.setComission(comission.getObjectValue());
111 vbox.appendChild(comission);
112 comission.afterCompose();
114 final FormulaListbox alert =
new FormulaListbox();
115 alert.setFormulaType(FormulaType.FORMULA_ALERT);
116 alert.setObjectValue(co.getAlert());
117 alert.addEventListener(Events.ON_SELECT,
new EventListener() {
119 public void onEvent(Event event)
throws Exception {
120 co.setAlert(alert.getObjectValue());
123 vbox.appendChild(alert);
124 alert.afterCompose();
127 Label label =
new Label(co.getVendor() !=
null ? co.getVendor().getName() :
"***");
128 row.appendChild(label);
130 label =
new Label(co.getComission().getName());
131 row.appendChild(label);
133 label =
new Label(co.getAlert().getName());
134 row.appendChild(label);
Set< CustomerOwner > getOwnedBy()
void setCustomer(Customer customer)