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

Listbox doesn't show all items when we use template and renderdefer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Normal Normal
    • None
    • 7.0.2
    • Components
    • None

      When we drag the scroll bar to the bottom, it doesn't show the last few items(e.g. 299) or in the wrong order.

       
      <hlayout>
      	<zscript><![CDATA[
      		String[] data = new String[300];
      		for (int j = 0; j < data.length; ++j) {
      			data[j] = "option " + j;
      		}
      		ListModel strset = new SimpleListModel(data);
      	]]></zscript>
      	<listbox width="200px" height="250px" model="${strset}">
      		<custom-attributes org.zkoss.zul.listbox.rod="false"/>
      		<listhead>
      			<listheader label="Load on demend" />
      		</listhead>
      		<template name="model">
      			<listitem renderdefer="1000">
      				<listcell>${each}</listcell>
      			</listitem>
      		</template>
      	</listbox>
      </hlayout>
      

      ZK fiddle link:

      http://zkfiddle.org/sample/99655s/7-bug

            Unassigned Unassigned
            JerryChen JerryChen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: