• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

CSS for individual selectItem tag  RSS feed

 
Greenhorn
Posts: 11
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want every option in selecOnemMenu to be displayed row and column as figure1.

Figure1.
myRadio1 myRadio2
myRadio3 myRadio4



<h:selectOneMenu value="#{user.favCoffee1}">
<f:selectItem itemValue="Cream Latte" itemLabel="Coffee3 - Cream Latte" />
<f:selectItem itemValue="Extreme Mocha" itemLabel="Coffee3 - Extreme Mocha" />
<f:selectItem itemValue="Buena Vista" itemLabel="Coffee3 - Buena Vista" />
<f:selectItem itemValue="Buena" itemLabel="Coffee3 - Buena" />
</h:selectOneMenu>


Can anyone help me out in this.
 
Bartender
Posts: 19953
94
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF renders selectOneMenu as an HTML SELECT and the selectItems as HTML OPTIONs. Although the specs say that you can attach CSS to OPTION elements, I know of absolutely no browsers that actually support that ability. Instead, they use the OPTION elements as data-only definitions without regard to display properties.

As far as 2 or more columns in a SELECT dropdown list, that simply isn't supported in HTML. Some of the JSF extension tagsets can do that, but they do it by generating "fake" HTML and using javascript to manipulate it, since the user's browser can't actually get the right display using basic HTML.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!