Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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: 20360
112
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.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!