Forums

Home » Alloy UI » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Andrew Holton
TreeView with children of type 'io' in Internet Explorer
August 25, 2012 9:06 PM
Answer

Andrew Holton

Rank: New Member

Posts: 3

Join Date: December 12, 2011

Recent Posts

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...

 1
 2AUI().ready('aui-tree-view','datatype-xml','dataschema-xml', function(A) {
 3
 4    var children = [                   
 5                    <%
 6                    for (String record: listOfRecords) {
 7                    %>
 8                        {
 9                             id: 'test',
10                             label: 'testing',
11                            leaf: false,
12                        draggable: false,
13                        io: 'someaddress.jsp',
14                            type: 'io'
15                        },
16                       <%
17                    }                   
18                    %>
19    ];
20
21    var tree1 = new A.TreeViewDD(
22        {
23            boundingBox: '#tree1',
24            children: children,
25            type: 'file',
26            width: 300
27        }
28    )
29    .render();
30   
31});
Jitendra Rajput
RE: TreeView with children of type 'io' in Internet Explorer
October 26, 2012 8:15 AM
Answer

Jitendra Rajput

Rank: Liferay Master

Posts: 677

Join Date: January 7, 2011

Recent Posts

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
RE: TreeView with children of type 'io' in Internet Explorer
September 6, 2013 5:51 AM
Answer

Andrew Holton

Rank: New Member

Posts: 3

Join Date: December 12, 2011

Recent Posts

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.