src/sap.ui.ux3/src/sap/ui/ux3/ExactList.js
function(oList, bArrow){
		function getNextOnSameLevel(oLst){
			var oParent = oLst.getParent();
			var aParentSubLists = oParent.getSubLists();
			var idx = oParent.indexOfSubList(oLst) + 1;
			if (idx < aParentSubLists.length) {
				return aParentSubLists[idx];
			}
			return null;
		}

		function getFirstChild(oLst){
			var aSubLists = oLst.getSubLists();
			if (aSubLists.length > 0) {
				return aSubLists[0];
			}
			return null;
		}

		function getNext(oLst){
			var oNextListRef = getNextOnSameLevel(oLst);
			if (oNextListRef) {
				return oNextListRef;
			}
			var oParent = oLst.getParent();
			if (oParent._iLevel > (bArrow ? 1 : 0)) {
				return getNext(oParent);
			} else {
				return null;
			}
		}

		if (oList._iLevel == 0) {
			return getFirstChild(oList);
		} else if (oList._iLevel == 1) {
			return bArrow ? getFirstChild(oList) : getNextOnSameLevel(oList);
		} else if (oList._iLevel > 1) {
			var oNextList = getFirstChild(oList);
			if (oNextList) {
				return oNextList;
			}

			return getNext(oList);
		}
		return null;
	}
function(oList, bArrow){
		function getNextOnSameLevel(oLst){
			var oParent = oLst.getParent();
			var aParentSubLists = oParent.getSubLists();
			var idx = oParent.indexOfSubList(oLst) + 1;
			if (idx < aParentSubLists.length) {
				return aParentSubLists[idx];
			}
			return null;
		}

		function getFirstChild(oLst){
			var aSubLists = oLst.getSubLists();
			if (aSubLists.length > 0) {
				return aSubLists[0];
			}
			return null;
		}

		function getNext(oLst){
			var oNextListRef = getNextOnSameLevel(oLst);
			if (oNextListRef) {
				return oNextListRef;
			}
			var oParent = oLst.getParent();
			if (oParent._iLevel > (bArrow ? 1 : 0)) {
				return getNext(oParent);
			} else {
				return null;
			}
		}

		if (oList._iLevel == 0) {
			return getFirstChild(oList);
		} else if (oList._iLevel == 1) {
			return bArrow ? getFirstChild(oList) : getNextOnSameLevel(oList);
		} else if (oList._iLevel > 1) {
			var oNextList = getFirstChild(oList);
			if (oNextList) {
				return oNextList;
			}

			return getNext(oList);
		}
		return null;
	}
function ( oList , bArrow ) { function getNextOnSameLevel ( oLst ) { var oParent = oLst . getParent ( ) ; var aParentSubLists = oParent . getSubLists ( ) ; var idx = oParent . indexOfSubList ( oLst ) + 1 ; if ( idx < aParentSubLists . length ) { return aParentSubLists [ idx ] ; } return null ; } function getFirstChild ( oLst ) { var aSubLists = oLst . getSubLists ( ) ; if ( aSubLists . length > 0 ) { return aSubLists [ 0 ] ; } return null ; } function getNext ( oLst ) { var oNextListRef = getNextOnSameLevel ( oLst ) ; if ( oNextListRef ) { return oNextListRef ; } var oParent = oLst . getParent ( ) ; if ( oParent . _iLevel > ( bArrow ? 1 : 0 ) ) { return getNext ( oParent ) ; } else { return null ; } } if ( oList . _iLevel == 0 ) { return getFirstChild ( oList ) ; } else if ( oList . _iLevel == 1 ) { return bArrow ? getFirstChild ( oList ) : getNextOnSameLevel ( oList ) ; } else if ( oList . _iLevel > 1 ) { var oNextList = getFirstChild ( oList ) ; if ( oNextList ) { return oNextList ; } return getNext ( oList ) ; } return null ; }
Returns the successor of the given list based on the level and whether TAB or the arrow keys are used
Returns the successor of the given list based on the level and whether TAB or the arrow keys are used