@Override
    public void generateUniqueIds() {
        generateUniqueIds(getElements(), null);
    }
Base implementation for model of a programmatic menu
primefaces/src/main/java/org/primefaces/model/menu/BaseMenuModel.java