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

sh:forEach insert item at wrong position

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.0.0
    • Fix Version/s: 8.0.0
    • Component/s: Databind 2
    • Security Level: Jimmy

      Description

      adding the value to the middle of the ListModelList will append the new item to the end when rendered.

      <zk xmlns:x="xhtml" xmlns:sh="shadow">
      	<zscript><![CDATA[
      		ListModelList model = new ListModelList();
      		model.add("1");
      		model.add("2");
      		model.add("3");
      		model.add("4");
      	]]></zscript>
      	<div id="bind" apply="org.zkoss.bind.BindComposer" >
      		<button label="insert" onClick='model.add(2, "2.5");'/>
      		<sh:forEach items="@load(model)" var="item">
      			<div>
      				<label value="@init(item)"/>
      			</div>
      		</sh:forEach>
      	</div>
      </zk>
      

        Issue Links

          Activity

          jumperchen jumperchen logged work - 17/Jun/15 5:16 AM
          • Time Spent:
            2 hours
             

            Bug fixed since 6/17/2015

            People

            • Assignee:
              jumperchen jumperchen
              Reporter:
              cor3000 cor3000
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h