Foros

Inicio » Alloy UI » English

Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Andrew Holton
TreeView with children of type 'io' in Internet Explorer
25 de agosto de 2012 21:06
Respuesta

Andrew Holton

Ranking: New Member

Mensajes: 6

Fecha de incorporación: 12 de diciembre de 2011

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

 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
26 de octubre de 2012 8:15
Respuesta

Jitendra Rajput

Ranking: Liferay Master

Mensajes: 824

Fecha de incorporación: 7 de enero de 2011

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
RE: TreeView with children of type 'io' in Internet Explorer
6 de septiembre de 2013 5:51
Respuesta

Andrew Holton

Ranking: New Member

Mensajes: 6

Fecha de incorporación: 12 de diciembre de 2011

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.