0

Hi i am trying to create a selectonemenu with jsf 2.2 with columns with images

     <h:selectOneMenu id="subscriptions" value="#{InscriptionBean.sexe}"
     <f:selectItem id="item1" itemLabel="Votre Chaine " itemValue="Votre chaine" />
 <f:selectItem id="item1" itemLabel="Homme" itemValue="Homme" >
 h:column>  
     <h:graphicImage value="/Ressources/images/nedal.PNG" width="40" height="50"/>  
     </h:column>  
     <h:column>
     <h:outputLabel value="test" />
     </h:column>
 </f:selectItem>
 </h:selectOneMenu>

but the problem that i get the image with the label outside the selectonemenu , and the 'Homme' inside

  • possible duplicate of [How to show images in – Alexandre Lavoie May 25 '14 at 03:47

1 Answers1

0

I am not sure that you can do it with h:selectOneMenu..

My suggestion to you is to use Primefaces.. It has more than 100 components that will make you life easier.. This is JSF library so you don't need to make any effort.

http://www.primefaces.org/showcase/ui/input/oneMenu.xhtml

This is the showcase from what you wanted including the code.. Check this out, Great Library.

You can check out other components and see that it will increase your product(fast and easy).

I used it and it was great.. really great

Aviad
  • 1,539
  • 1
  • 9
  • 24