Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1202

Update model of the combobox and change the selection of mofel will cause java error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.0.2
    • 6.0.1
    • Components
    • Security Level: Jimmy
    • None

      http://www.zkoss.org/forum/listComment/19734

      <zk>
      	<zscript><![CDATA[
      		ListModelList model = 
      			new ListModelList(
      				Arrays.asList(new String[]{"a", "b", "c", "d", "e"}));
      	]]></zscript>
      	<combobox id="cb" model="${model }">
      		<template name="model" >
      			<comboitem label="${each}" />
      		</template>			
      	</combobox>
      	<button label="updateModel">
      		<attribute name="onClick"><![CDATA[
      			cb.setModel(new ListModelList(
      					Arrays.asList(new String[]{"a", "b", "c"})));
      		]]></attribute>
      	</button>
      	<button label="add select">
      		<attribute name="onClick"><![CDATA[
      			cb.getModel().addToSelection("a");
      		]]></attribute>
      	</button>
      </zk>
      

            neillee neillee
            jimmyshiau jimmyshiau
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: