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

Messagebox show called inside include in defer mode doesn't show if include is refreshed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.6.2
    • 8.6.1
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.6.2 S1, ZK 8.6.2 S2
    • None

      Steps to Reproduce

      http://zkfiddle.org/sample/3g7j14l/4-include-messagebox-bug
      click "show and refresh"
      close messagebox
      click "show and refresh" again

      Current Result

      messagebox doesn't show up

      Expected Result

      messagebox should show up

      Debug Info

      Messagebox is created inside the included page.
      When include src is changed, include components are dropped from working component tree and a new page without messagebox is sent to AuWriter

      Root Cause

      org.zkoss.zk.ui.impl.AbstractExecution.getCurrentPage() will return included page when creating the Messagebox, since Messagebox.show doesn't specify the root page.

      Workaround

      Use include in instant mode
      >> can't use ?par=val in include src URL as this force defer mode
      To refresh include, use setSrc(null);setSrc(actualPath) instead

            Leon03 Leon03
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 day, 4 hours
                1d 4h
                Remaining:
                Time Spent - 1 day Remaining Estimate - 4 hours
                4h
                Logged:
                Time Spent - 1 day Remaining Estimate - 4 hours
                1d