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

onSelect is not fired in listbox mold select

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.0.1
    • 6.0.0
    • Components
    • None

      <zk>
      <div>
      <zscript>
      org.zkoss.zul.ListModelList list = new org.zkoss.zul.ListModelList();
      list.add("A");
      list.add("B");
      list.add("C");
      </zscript>
      		<label multiline="true">
      		[onSelect not fired if there is a listheader]
      		1.Both listbox should select to B.
      		2.select C on listbox 1, it should pop up a message 'onSelect .....' (will not if bug is not fixed)
      		3.select C on listbox 2,  it should pop up a message 'onSelect .....'
      		</label>
      	<window apply="org.zkoss.bind.BindComposer"
      		title="a title" width="400px">
      
      		<listbox mold="select"  width="100%" model="${list}"
      			onSelect='alert("onSelect "+self.getSelectedItem())' onCreate='list.addToSelection("B")'>
      			<listhead>
      				<listheader></listheader>
      			</listhead>
      			<template name="model">
      				<listitem>
      					<listcell label="${each}"></listcell>
      				</listitem>
      			</template>
      		</listbox>
      		<listbox mold="select"  width="100%" model="${list}"
      			onSelect='alert("onSelect "+self.getSelectedItem())' onCreate='list.addToSelection("B")'>
      			<template name="model">
      				<listitem>
      					<listcell label="${each}"></listcell>
      				</listitem>
      			</template>
      		</listbox>
      	</window>
      	</div>
      </zk>
      
      

            TonyQ TonyQ
            dennis dennis
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: