18 package org.turro.zkoss.input;
20 import org.turro.i18n.I_;
21 import org.zkoss.zul.Listitem;
30 private boolean allowNull;
31 private String nullLabel =
"None";
33 public EnumListbox(V[] values) {
37 public boolean isAllowNull() {
41 public void setAllowNull(
boolean allowNull) {
42 this.allowNull = allowNull;
45 public String getNullLabel() {
49 public void setNullLabel(String nullLabel) {
50 this.nullLabel = nullLabel;
53 public V[] getValues() {
57 public void setValues(V[] values) {
62 protected void populateList() {
63 if(values ==
null)
return;
65 Listitem li =
new Listitem(
I_.
get(nullLabel),
null);
69 Listitem li =
new Listitem(getString(v), v);
74 protected String getString(V v) {
static String byKey(String key)
static String get(String msg)