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

A misleading error message in <when>

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.0.0
    • Fix Version/s: 9.6.0
    • Component/s: Databind 2
    • Labels:
      None

      Description

      Steps to Reproduce

      <zk>
          <forEach begin="1" end="100">
              <when test="${each gt 50}">
                  ${each}
              </when>
          </forEach>
      </zk>
      

      Current Result

      Unsupported parent for otherwise: <ForEach@0 (<NoDOM cX6Z0>)>

      Expected Result

      Unsupported parent for when: <ForEach@0 (<NoDOM cX6Z0>)>

      Debug Information

      A typo in the error message.

      	public void beforeParentChanged(Component parent) {
      		if (parent != null && !(parent instanceof Choose))
      			throw new UiException("Unsupported parent for otherwise: " + parent);
      		super.beforeParentChanged(parent);
      	}
      

      Workaround

        Attachments

          Activity

            People

            Assignee:
            rudyhuang rudyhuang
            Reporter:
            rudyhuang rudyhuang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h