@Override
    public void generateUniqueIds() {
        if (!generated) {
            super.generateUniqueIds();
            generated = true;
        }
    }
Default implementation of a MenuModel optimized for static menus that do not change once built.
primefaces/src/main/java/org/primefaces/model/menu/DefaultMenuModel.java