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

A misleading error message in <when>

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 9.6.0
    • 8.0.0
    • Databind 2
    • None

      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

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

              Created:
              Updated:
              Resolved:

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