How do I add child elements to a org.apache.wicket.extensions.markup.html.form.select.SelectOption
I have tried the following:
SelectOption<String> wicketSelectOption = new SelectOption<String>("option", new Model<>(selectOption.getValue()));
wicketSelectOption.setRenderBodyOnly(false);
wicketSelectOption.setEscapeModelStrings(false);
Label label = new Label("optionLabel", "<i class=\"icon\"></i>" + selectOption.getLabel());
label.setEscapeModelStrings(false);
wicketSelectOption.add(label);
Result:
The < i > tag is completely ignored