I can't escape selectItems itemLabel to generate an image
Example:
<h:selectOneRadio layout="pageDirection" styleClass="labelWhite" id="logoRadios" value="#{bean.value}" >
<f:selectItems itemLabelEscaped="false" value="#{imageSources}" var="imgSrc" itemLabel="#{imgSrc}" itemValue="O" />
</h:selectOneRadio>
JAVA:
@Factory("imageSources")
List<SelectItem> imageSourceList= null;
List<Object> allLogos = someService.serviceImplGetAll(var);
imageSourceList= new ArrayList<SelectItem>(allLogos.size());
for(Object value : allLogos)
{
selectableLogos.add(new SelectItem("<img src=\""+ value.getLogoResource() + "\" /> "));
}
return imageSourceList;
All I get when generated is:
<td>
<input type="radio" name="j_id579:logoRadios" id="j_id579:logoRadios:0" value="<img src="/img/rfcLogos/fall_1.svg" /> ">
<label for="j_id579:logoRadios:0"> <img src="/img/rfcLogos/fall_1.svg" /> </label>
</td>
The value is wrong I reckon but for now I'm more concerned on the part that it did not render the img src(not picture only text)