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

nested foreach/if/apply problems

    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
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 8.0.1

      Description

      the attached example shows 2 problems:

      1. replacing the elements in the listmodel does not clear the details labels rendered with the "detailsLabel" template, it simply appends a new item in the UI even though the model was cleared before adding the new item.

      2. removing the only element in the model, and trying add it again causes a NullPointerException. when adding the new element:

      java.lang.NullPointerException
      	at org.zkoss.zk.ui.HtmlShadowElement.setShadowHost(HtmlShadowElement.java:257)
      	at org.zkoss.zk.ui.impl.AbstractUiFactory.newComponent(AbstractUiFactory.java:112)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:825)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:801)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.access$800(UiEngineImpl.java:128)
      	at org.zkoss.zk.ui.impl.UiEngineImpl$TemplateImpl.create(UiEngineImpl.java:2275)
      	at org.zkoss.zuti.zul.ForEachRenderer.render(ForEachRenderer.java:68)
      	at org.zkoss.zuti.zul.ForEachListDataListener.renderModelData(ForEachListDataListener.java:120)
      	at org.zkoss.zuti.zul.ForEachListDataListener.onListModelDataChange(ForEachListDataListener.java:68)
      	at org.zkoss.zuti.zul.ForEachListDataListener.onChange(ForEachListDataListener.java:45)
      	at org.zkoss.zul.AbstractListModel.fireEvent(AbstractListModel.java:61)
      	at org.zkoss.zul.ListModelList.add(ListModelList.java:183)
      

        Attachments

          Activity

            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 - 5 hours, 30 minutes
                5h 30m