-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I've tried the following in the online demo:
<zk> <zscript><![CDATA[ SimpleListModel levels = new SimpleListModel( new String[]{ "LOW", "MIDDLE", "HIGH" } ); ]]></zscript> <listbox id="list" width="200px" rows="10" model="${levels}" /> <zscript> <![CDATA[ for( li: list.getItems() ) { alert( "" + li.getValue() ); } ]]> </zscript> </zk>
<zk> <zscript><![CDATA[ SimpleListModel levels = new SimpleListModel( new String[]{ "LOW", "MIDDLE", "HIGH" } ); ]]></zscript> <listbox id="list" width="200px" rows="10" model="${levels}" /> <button label="klikk!" onClick='showItems()' /> <zscript> <![CDATA[ void showItems() { for( li: list.getItems() ) { alert( "" + li.getValue() ); } } ]]> </zscript> </zk>
it works fine.
With kind regards
César Varona
Asked: 2008-12-10 17:45:12 +0800
Seen: 138 times
Last updated: Dec 11 '08