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

re-displaying modal window containing stubobly label throws js error

    XMLWordPrintable

    Details

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

      ZK 6

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: