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

Usage of cached Ids fails with MANY components

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 7.0.5
    • None
    • None

      I have a <listbox> in which I populate thousands of <row>s, each having tens of own components. The listbox is paged only using mold="paging".
      I use a custom IdGenerator which outputs random but near guaranteed unique IDs.
      When this list is rendered, my custom idGenerator is called. When I then open a modal window, ZK throws this error message:
      org.zkoss.zk.ui.UiException: It took too much time to look for unique UUID. Please check the implementation of IdGenerator.
      at org.zkoss.zk.ui.AbstractComponent.nextUuid(AbstractComponent.java:495)
      at org.zkoss.zk.ui.AbstractComponent.setPage0(AbstractComponent.java:469)
      at org.zkoss.zk.ui.AbstractComponent.setPage0(AbstractComponent.java:482)

      I have two issues concerning this message.

      • It is a lie. It does not take too much time. It takes too many tries. There is a counter that fails after 10000 failed tries in AbstractComponent#nextUuid(Desktop desktop).
      • My implementation of IdGenerator is not involved. Neither is ZK's IdGenerator. When i debug into the code, I see org.zkoss.zk.ui.impl.DesktopImpl#public String getNextUuid(Component comp), which tries to recycle an already used id.

      I tried to reproduce this issue in zk fiddle. There seems to be no way to specify a custom <system-config>-entry for zk.xml.
      http://zkfiddle.org/sample/122ng80/2-brokenIdGeneration#source-3

            Unassigned Unassigned
            salbader salbader
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: