trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuContentHandlerImpl.java [433:468]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public void endDocument()
  {
    if (_menuNodes.isEmpty())
    {
      // Empty tree is created to prevent
      // later NPEs if menu model methods are called.
      _LOG.warning ("CREATE_TREE_WARNING: Empty Tree!");

      List<MenuNode> list = Collections.emptyList();
      _menuList = list;
    }
    else
    {
      _menuList = _menuNodes.get(0);

      // Create the treeModel
      ChildPropertyTreeModel treeModel =
                    new ChildPropertyTreeModel(_menuList, "children");


      if (_isRootHandler)
      {
        _viewIdFocusPathMap = new HashMap<String,List<Object>>();
        _nodeFocusPathMap   = new HashMap<Object, List<Object>>();
        _idNodeMap          = new HashMap<String, Object>();
        Object oldPath      = treeModel.getRowKey();

        treeModel.setRowKey(null);

        // Populate the maps
        _addToMaps(treeModel, _viewIdFocusPathMap, _nodeFocusPathMap, _idNodeMap);

        treeModel.setRowKey(oldPath);
      }
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuContentHandlerUsingApiImpl.java [436:471]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public void endDocument()
  {
    if (_menuNodes.isEmpty())
    {
      // Empty tree is created to prevent
      // later NPEs if menu model methods are called.
      _LOG.warning ("CREATE_TREE_WARNING: Empty Tree!");

      List<MenuNode> list = Collections.emptyList();
      _menuList = list;
    }
    else
    {
      _menuList = _menuNodes.get(0);

      // Create the treeModel
      ChildPropertyTreeModel treeModel =
                    new ChildPropertyTreeModel(_menuList, "children");


      if (_isRootHandler)
      {
        _viewIdFocusPathMap = new HashMap<String,List<Object>>();
        _nodeFocusPathMap   = new HashMap<Object, List<Object>>();
        _idNodeMap          = new HashMap<String, Object>();
        Object oldPath      = treeModel.getRowKey();

        treeModel.setRowKey(null);

        // Populate the maps
        _addToMaps(treeModel, _viewIdFocusPathMap, _nodeFocusPathMap, _idNodeMap);

        treeModel.setRowKey(oldPath);
      }
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



