Foros de discusión

TreeView with children of type 'io' in Internet Explorer

Andrew Holton, modificado hace 11 años.

TreeView with children of type 'io' in Internet Explorer

New Member Mensajes: 6 Fecha de incorporación: 12/12/11 Mensajes recientes
Been using TreeViewDD to build a 3 level tree, and need to use 'io' to make each branch dynamic. I'm building the first level by iterating through a List<> object to create the children array, then attaching that in the usual way to the tree object. There are about 56 records in this List

In firefox and chrome, it works fine, a tiny bit of lag but acceptable. However, IE8 gives me the 'A script on this page is causing your web broswer to run slowly...' error. It doesn't actually break the process and when I tell it to not stop running the script, it finishes and I can continue to use the tree. The time it takes is comparable to FF and Chrome too, but it just seems to get upset quickly about it.

Has anyone else found issues with using type: 'io' on the nodes in any flavour of IE? The tipping point (in my case) seems to be around the 50 nodes mark. Is there a trick I don't know about or is it just a limitation of IE's JS engine? Obviously I can't release a project that is going to display this error to IE users.

The below snippet has trimmed out all my specific code, but still actually throws up the error in IE...


AUI().ready('aui-tree-view','datatype-xml','dataschema-xml', function(A) {

	var children = [	                
	                &lt;%
	                for (String record: listOfRecords) {
	                %&gt;
	                	{
	     					id: 'test',
	     					label: 'testing',
	    					leaf: false,
						draggable: false,
						io: 'someaddress.jsp',
	    					type: 'io'
	                	},
               		&lt;%
	                }	                
	                %&gt;
	];

	var tree1 = new A.TreeViewDD(
		{
			boundingBox: '#tree1',
			children: children,
			type: 'file',
			width: 300
		}
	)
	.render();
	
});
thumbnail
Jitendra Rajput, modificado hace 11 años.

RE: TreeView with children of type 'io' in Internet Explorer

Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
Did you find any solution or root cause of this issue ? Even we are facing the same issue with tree view in manage pages.
Andrew Holton, modificado hace 10 años.

RE: TreeView with children of type 'io' in Internet Explorer

New Member Mensajes: 6 Fecha de incorporación: 12/12/11 Mensajes recientes
Hi Jitendra, I realise it's been nearly a year so you've probably moved on emoticon .... but I never found a solution, only a workaround...
IE10 was ok (from memory), so I just put in a check for IE9 or less, used this to fire off to a different method which would break the list into small chunks (no more than 50 items), build that chunk, then stitch the lot back together. So on screen in IE9 or older, you would actually see it grow in increments of about 50, rather than wait for the lot to be ready and load.