code: private void processExpandedCustomIdIndexMapping(final TreeItemIdNode node, final Set<String> expandedRows,
  			final Map<String, List<Integer>> map) {
  
  		String itemId = node.getItemId();
  		if (!Util.empty(itemId)) {
  			List<Integer> rowIndex = getRowIndexForCustomItemId(itemId);
  			map.put(itemId, rowIndex);
  		}
  
  		// Node has no children
  		if (!node.hasChildren()) {
  			return;
  		}
  
  		// Check node is expanded
  		boolean expanded = expandedRows == null || expandedRows.contains(node.getItemId());
  		if (!expanded) {
  			return;
  		}
  
  		// Check the expanded child nodes
  		for (TreeItemIdNode child : node.getChildren()) {
  			processExpandedCustomIdIndexMapping(child, expandedRows, map);
  		}
  	}
docs: Iterate through nodes to create a mpa of item ids and their row index
  <p>
  If a node is flagged as having children and has none, then load them from the tree model.
  </p>
  
  @param node the node to check
  @param expandedRows the expanded rows or null if include all
  @param map the map of item ids to row index