19 package org.turro.crm.zul.sale;
21 import java.util.Collection;
22 import java.util.HashSet;
23 import java.util.logging.Level;
24 import java.util.logging.Logger;
25 import org.turro.command.Command;
26 import org.turro.command.Context;
27 import org.turro.crm.db.CrmPU;
28 import org.turro.elephant.context.ElephantContext;
29 import org.turro.elephant.util.Images;
30 import org.turro.zkoss.input.MultiLabelBox;
38 private HashSet<String> types;
85 return new CrmPU().getResultList(
"select distinct sat from SaleAction sa join sa.actionType sat");
89 protected void addChoice(String choice, Command command) {
91 types =
new HashSet<>();
93 if(types.add(choice)) {
94 if(command !=
null)
try {
95 command.execute(
null);
96 }
catch (Exception ex) {
103 protected void changeChoice(
final String oldChoice, String choice,
final Command command) {
106 public Object execute(Context context) {
109 public Object execute(Context context) {
110 if(command !=
null)
try {
111 command.execute(
null);
112 }
catch (Exception ex) {
125 if(types.remove(oldChoice)) {
126 if(command !=
null)
try {
127 command.execute(
null);
128 }
catch (Exception ex) {
void changeChoice(final String oldChoice, String choice, final Command command)
Collection< String > getTypes()
void addChoice(String choice, Command command)
void setTypes(HashSet< String > types)
Collection< String > getLabelChoices()
Collection< String > getCollection()
void deleteChoice(String oldChoice, Command command)
String convertToString(String label)
static String logMsg(String msg)
static String getImage(String image)