ICEfaces
  1. ICEfaces
  2. ICE-10842

ace:tree - Leaf nodes show incorrect icons for lazy loaded tree

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-4.0.0.GA, EE-3.3.0.GA_P03
    • Fix Version/s: 4.1, EE-3.3.0.GA_P04
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      The leaf nodes of the ace:tree that is lazily loaded show the expand and contract (+/-) icons when they should not. Clicking the icons don't do anything.

      This can be reproduced with the Showcase demo for the ace:tree Lazy Loading. (EE 3.3.0 and 4.0.0).

        Activity

        Hide
        Ken Fyten added a comment -

        The obvious solution here would require that the lazy-loaded tree code always pre-load one additional level of the tree hierarchy when expanding a branch node so that each child of the branch can be determined to be either another branch node (display +/- controls) or a leaf node (no +/- controls).

        This may cause some undesirable performance degradation on very large-data sets, so we should make this an optional behaviour, configurable via a new value for the existing "expansionMode" attribute: org.icefaces.ace.component.tree.TreeExpansionMode.extServer (extended server).

        Show
        Ken Fyten added a comment - The obvious solution here would require that the lazy-loaded tree code always pre-load one additional level of the tree hierarchy when expanding a branch node so that each child of the branch can be determined to be either another branch node (display +/- controls) or a leaf node (no +/- controls). This may cause some undesirable performance degradation on very large-data sets, so we should make this an optional behaviour, configurable via a new value for the existing "expansionMode" attribute: org.icefaces.ace.component.tree.TreeExpansionMode.extServer (extended server).
        Hide
        Arturo Zambrano added a comment -

        r46279: fix to check if a node is a leaf node in lazy mode, only if the immediate parent is expanded

        I verified that, in lazy mode, child nodes are only being loaded if the current node is expanded, as intended.

        This fix checks its immediate parent to see if its state is expanded. If so, we allow the code to go ahead and check if the current node is a leaf node (by loading its children), and thus we can determine whether to load the expansion/contraction icons or nothing at all.

        Show
        Arturo Zambrano added a comment - r46279: fix to check if a node is a leaf node in lazy mode, only if the immediate parent is expanded I verified that, in lazy mode, child nodes are only being loaded if the current node is expanded, as intended. This fix checks its immediate parent to see if its state is expanded. If so, we allow the code to go ahead and check if the current node is a leaf node (by loading its children), and thus we can determine whether to load the expansion/contraction icons or nothing at all.
        Hide
        Arturo Zambrano added a comment -

        r46280: committed fix to the 3.3 EE maintenance branch

        Show
        Arturo Zambrano added a comment - r46280: committed fix to the 3.3 EE maintenance branch
        Hide
        Carmen Cristurean added a comment -

        Verified IF4 trunk r46287/ EE-3.3.0-maintenance branch r46288 in IE8/9/10/11, FF41, Chrome46.
        Two random IndexOutOfBoundsExceptions have been seen while testing on the maintenance branch, however these errors could not be reproduced again.

        Show
        Carmen Cristurean added a comment - Verified IF4 trunk r46287/ EE-3.3.0-maintenance branch r46288 in IE8/9/10/11, FF41, Chrome46. Two random IndexOutOfBoundsExceptions have been seen while testing on the maintenance branch, however these errors could not be reproduced again.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: