Given the following list of <p:selectOneRadio>
.
<p:selectOneRadio layout="grid" columns="1" value="#{1}">
<f:selectItem id="paypal" itemValue="1" itemLabel="Paypal"/>
<f:selectItem id="wireTransfer" itemValue="2" itemLabel="Wire Transfer"/>
</p:selectOneRadio>
Is it possible to display an image as a label of <f:selectItem>
so that the list looks something like the following?
I tried using a <p:outputLabel>
placing a <p:graphicImage>
inside and removing the itemLabel
attribute from the<f:selectItem>
inside the <p:selectOneRadio>
but either way it did not work.
<p:outputLabel for="paypal">
<p:graphicImage library="default" name="images/payments/paypal_logo.jpeg"/>
</p:outputLabel>
You can solve it using the SelectOneRadio - Custom Layout
Here an example: