Tree rendering error in IE7/8

UI Components for JSF
Post Reply
jtrotman
Posts: 49
Joined: 29 Nov 2010, 14:32
Location: United Kingdom

17 Dec 2010, 18:09

Hi

I am experiencing an unusual problem when using Tree in Internet Explorer. When expanding a node that is dynamically populated using nodeExpandListener, there is an extra node rendered at the bottom of the node list in IE8 (or, in IE7 at the top of the list). Attempting to expand this node results in a NumberFormatException with message 'For input string: "undefined"'. Mozilla Firefox 3.6 renders the tree as expected. Please note that the error only occurs as an extra node in the child list of a node that has just been expanded - rendering a tree with pre-expanded nodes does not result in the error.

Code for the Facelet displaying the tree is as follows:

Code: Select all

    <ui:composition>
        <p:tree id="#{id}" value="#{backingBean.model}" var="node" dynamic="true"
                nodeExpandListener="#{backingBean.onNodeExpand}"
                nodeSelectListener="#{backingBean.onNodeSelect}" 
                selection="#{backingBean.selectedNodes}"
                selectionMode="single" update="#{update}">
            <p:treeNode>
                <h:outputText value="#{node}"/>
            </p:treeNode>
        </p:tree>
    </ui:composition>
My nodeExpandListener populates the children of the clicked node using nested for loops iterating over a map:

Code: Select all

                    for (SupplierCategory cat : categorisedMap.keySet()) {
                        TreeNode catNode = new DefaultTreeNode(cat, node);
                        for (PriceChangeType type : categorisedMap.get(cat).keySet()) {
                            TreeNode typeNode = new DefaultTreeNode(type, catNode);
                            for (PriceChangeRequest rq : categorisedMap.get(cat).get(type)) {
                                TreeNode rqNode = new DefaultTreeNode(rq, typeNode);
                            }
                        }
                    }
Any thoughts as to why this might be occurring would be appreciated, as correct rendering under IE8 is essential for this project.

The current system is running a stack of Spring 3.0.5, Mojarra 2.0.2 and Primefaces 2.2 RC2.

Thanks

Jim

jtrotman
Posts: 49
Joined: 29 Nov 2010, 14:32
Location: United Kingdom

23 Dec 2010, 13:56

Sorry to bump my post, but I thought I'd make one final request before I log this as a bug. If you look at the attached image you'll see what I mean. This bug always occurs in IE when expanding a node with dynamically populated children. Image

Any insight would be greatly appreciated.

Jim

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 23 guests