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

Hlayout/Vlayout performance issue

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 5.0.8
    • Fix Version/s: 5.0.9, 6.0.0
    • Component/s: Components
    • Labels:
      None

      Description

      Hlayout/Vlayout shall use fireDown() rather then fire() in syncSize()

      Test case:

      <zk>
      	<zscript><![CDATA[
      		import java.util.ArrayList;
      		ArrayList productList = new ArrayList();
      		ListModelList listModel = new ListModelList();
      		int i = 0;
      		while (i < 5) {
      			String p = new String("name" + i++);
      			productList.add(p);
      		}
      		listModel.addAll(productList);
      		RowRenderer render = new RowRenderer() {
      			public void render(Row row, Object data) throws Exception {
      				String p = (String) data;
      				
      				Hlayout l = new Hlayout();
      				l.appendChild(new Label("Label"));
      				l.setParent(row);
      				
      				Div div = new Div();
      				div.setHflex("1");
      				div.setParent(row);
      			}
      		};
      		void setProdListModel(int amount) {
      			int i = 0;
      			productList.clear();
      			listModel.clear();
      			while (i < amount) {
      				String p = new String("name" + i++);
      				productList.add(p);
      			}
      			listModel.addAll(productList);
      		}
      	]]></zscript>
      	<window title="new page title" border="normal">
      		ListModelList Size:
      		<intbox id="modelSize" value="50" />
      		<button label="change" id="button">
      			<attribute name="onClick">
      				setProdListModel(modelSize.getValue());
      				grdProductProductions.setModel(listModel);
      			</attribute>
      		</button>
      		<grid width="100%" id="grdProductProductions"
      			model="${listModel}" rowRenderer="${render}">
      			<columns sizable="true">
      				<column label="total" align="left" />
      				<column label="obver" align="center" />
      			</columns>
      		</grid>
      	</window>
      </zk>
      

        Attachments

          Activity

            People

            • Assignee:
              SimonPai SimonPai
              Reporter:
              SimonPai SimonPai
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: