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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 7.0.0
    • Fix Version/s: 7.0.0
    • Component/s: Components
    • Labels:
      None

      Description

      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>
      
      

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: