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

Ajax loading of 2 zul files containing native/xhtml component shows js error

XMLWordPrintable

      home.jsp

      <html>
      <head>
      <script
      	src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
      <script>
      	$(document).ready(function() {
      		$("#refresh").click(function(event) {
      			console.log($(this).text() + " was clicked !!!");
      			$.ajax ({
      				url: "inc1.zul",
      				success: function(data) {$("#zk-contentwrap1").html(data);},
      				error: function(data) {console.log("Error getting inc1.zul");}
      			});
      			$.ajax ({
      				url: "inc2.zul",
      				success: function(data) {$("#zk-contentwrap2").html(data);},
      				error: function(data) {console.log("Error getting inc2.zul");}
      			});
      		});
      		console.log('ready!');
      	});
      </script>
      </head>
      <body>
      	<button id="refresh">Refresh</button>
      	<div id="zk-contentwrap1"></div>
      	<div id="zk-contentwrap2"></div>
      </body>
      </html>
      

      inc1.zul

      <?page title="Auto Generated index.zul"?>
      <window title="This is Portlet 1" border="normal" width="200px" xmlns:w="client" xmlns:h="xhtml" xmlns:n="native">
      	<n:div id="zkcontentwrapportlet1"></n:div>
      </window>
      

      inc2.zul

      <?page title="Auto Generated index.zul"?>
      <window title="This is Portlet 2" border="normal" width="200px" xmlns:w="client" xmlns:h="xhtml" xmlns:n="native">
      	<n:div id="zkcontentwrapportlet2"></n:div>
      </window>
      

      Steps to reproduce
      1. Load home.jsp in browser (tested with chrome latest)
      2. click "Refresh" button

      Expected:
      2 divs in home.jsp are populatd with contents of 2 zul files loaded via ajax on Refresh button onclick
      Actual:
      Rendering is stuck on "Processing". JS Console shows "Uncaught RangeError: Maximum call stack size exceeded"

            vincentjian vincentjian
            ashishd ashishd
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: