re-displaying modal window containing stubobly label throws js error

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Normal
    • None
    • Affects Version/s: 6.0.0, Freshly
    • Component/s: Components
    • Environment:

      ZK 6

    • None

      Test case

      <zk>
      <zscript>
      <![CDATA[  //@IMPORT
      import org.zkoss.zk.ui.event.EventListener;
      ]]>
      <![CDATA[  //@DECLARATION
      
        Window win = null;
      
        public class MyListener implements EventListener{
         	public void onEvent(Event evt) throws Exception{
      
             if (win ==null)
             {	   
               win = new Window();
               win.setTitle("Hello!");
               win.setClosable(true);
      
      		 Label testLabel = new Label("My Label");
      		 testLabel.setStubonly("true");
               win.appendChild(testLabel);
             }
             win.setParent(evt.getTarget().getFellow("mainWindow"));
             win.doModal();
          }
       }
      ]]>
      </zscript>
      
      <window id="mainWindow">
      <button>Click me!
      	<attribute name="onCreate">
      		self.addEventListener("onClick", new MyListener(){});
      	</attribute>
      </button>
      </window>
      </zk>
      

      Steps to reproduce:
      1. Click on button. Modal window containing label is displayed
      2. Close the window
      3. Click on the button again to open window.
      Expected: Window with label is displayed correctly.
      Actual: JS error "Failed to mount stub XXXX" is shown

      Notice: it works fine on ZK 5.

            Assignee:
            tomyeh
            Reporter:
            ashishd
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: