code: protected void renderOptions(FacesContext context, ResponseWriter rw, String[] selectedOption, SelectMultiMenu menu)
  			throws IOException {
  		Converter converter = menu.getConverter();
  		List<SelectItemAndComponent> items = SelectItemUtils.collectOptions(context, menu, converter);
  
  		for (int index = 0; index < items.size(); index++) {
  			Object option = items.get(index).getSelectItem();
  			if (option instanceof SelectItem) {
  				renderOption(rw, (SelectItem) option, selectedOption, index);
  			} else {
  				renderOption(rw, (UISelectItem) option, selectedOption, index);
  			}
  		}
  	}
docs: Parts of this class are an adapted version of
  InputRenderer#getSelectItems() of PrimeFaces 5.1.
  
  @param rw
  @param selectedOption
  @throws IOException