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

add an item to model always cause whole tabbox be re-rendered.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 7.0.0
    • 7.0.0
    • Components
    • None

      When add a item to model of tabbox, it always causes tabbox rerender all tabs/panels.
      int the case of tabpanel has sub page(using include). it cause every sub-page reload again, that has bad performance.

      Step.
      1.Click Add, to add a new tab.
      2.you will see the time in tabpanel1 always be updated (which means it rendered)

      <vbox>
      <zscript><![CDATA[
      ListModelList model = new ListModelList();
      model.add("A");
      model.add("B");
      model.add("C");
      ]]></zscript>
      <tabbox onCreate='self.setModel(model);model.addToSelection("B")'>
      	<template name="model:tab">
      		<tab label="${each} ${count}"></tab>
      	</template>
      	<template name="model:tabpanel">
      		<tabpanel>Panel ${each} ${count}
      			<button label="click me ${each}" onClick="//do nothing"></button>
      			<include src="test2.zul"/>
      		</tabpanel>
      	</template>
      </tabbox>
      <button label="click me out side" onClick="//do nothing"></button>
      <button label="ADD" onClick='model.add("Y")'></button>
      </vbox>
      
      <vbox>
      <zscript><![CDATA[
      Date now = new Date();
      ]]></zscript>
      <label value="create time : ${now}"/>
      </vbox>
      
      

            jumperchen jumperchen
            dennis dennis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: