ZK obtenir de l'élément sélectionné dans la combobox

J'essaie d'obtenir la valeur sélectionnée dans la zone de liste déroulante, mais il revient à la ComboItem.Comment puis-je obtenir la valeur en tant que chaîne de caractères?

<zscript>
  <![CDATA[
    String[] months = { "Ada", "Basic", "C", "C++", "Cobol", "Forth",
            "Fortran", "Go", "Groovy", "Haskell", "Java", "JavaScript", "Lisp",
            "Python", "Ruby", "Scala", "Scheme" };
  ListModel lmonths = new SimpleListModel(months);
]]></zscript>
                    <combobox id="searchCombo"
                        forward="onChange=onSearch" model="@{months}" >
<!-- 
                        <comboitem self="@{each='months'}"
                            label="@{months}" value="@{months}">
                        </comboitem>
 -->

                        </combobox>

Et voici mon onSearch méthode

public void onSearch(ForwardEvent event) {


        System.out.println(searchCombo.getSelectedItem());


    prodevt.search(searchCombo.getSelectedItem().toString());
        filterCbox.setChecked(true);



        AnnotateDataBinder binder = (AnnotateDataBinder) win.getVariable(
                "binder", true);

        binder.loadAll();

    }
InformationsquelleAutor Ercan | 2010-12-08