[prev in list] [next in list] [prev in thread] [next in thread] 

List:       myfaces-dev
Subject:    [jira] [Created] (TRINIDAD-2356) Regression caused by the check in of issue TRINIDAD-2158
From:       "hongbing wang (JIRA)" <dev () myfaces ! apache ! org>
Date:       2013-01-30 20:45:12
Message-ID: JIRA.12629993.1359578663324.217661.1359578712741 () arcas
[Download RAW message or body]

hongbing wang created TRINIDAD-2356:
---------------------------------------

             Summary: Regression caused by the check in of issue TRINIDAD-2158
                 Key: TRINIDAD-2356
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2356
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Components
    Affects Versions: 2.0.1-core
            Reporter: hongbing wang


The fix of issue TRINIDAD-2158 causes a regression in tree when initiallyExpanded is \
used. The iterator of disclosed row key set doesn't return next correctly, which \
cause the tree can not render all initially expanded nodes.

The following fix in RowKeySetTreeNode
          // When the currentNode has no child nodes, the 
          // iterator instance is not pushed to iteratorStack.
          if(!nextNode.getValue().isEmpty())
          {
            _iteratorStack.push(_currIterator);
            _currIterator = nextNode.getValue().entrySet().iterator();
            if(nextNode.getValue().isDefaultContained)
            {
              _currPath = nextNode.getKey();
              TreeModel model = getCollectionModel();
              Object oldPath = model.getRowKey();
              model.setRowKey(_currPath);
              _minDepth = model.getDepth() + 1;
              model.setRowKey(oldPath);
              return nextKey;
            }
          }

should be changed to let the tree node to set _currPath and _miniDepth correctly.
          // When the currentNode has no child nodes, the 
          // iterator instance is not pushed to iteratorStack.
          if(!nextNode.getValue().isEmpty())
          {
            _iteratorStack.push(_currIterator);
            _currIterator = nextNode.getValue().entrySet().iterator();
          }
          if(nextNode.getValue().isDefaultContained)
          {
            _currPath = nextNode.getKey();
            TreeModel model = getCollectionModel();
            Object oldPath = model.getRowKey();
            model.setRowKey(_currPath);
            _minDepth = model.getDepth() + 1;
            model.setRowKey(oldPath);
            return nextKey;
          }


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic