Win a flower (🌹) or copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java (📚) this week in the Agile and Other Processes 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
master stewards:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
garden masters:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

How to align items inside the selectManyCheckbox ?

  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

i want to align the items inside the selectManyCheckBox.

<h:selectManyCheckbox value="#{baseAction.hlrAppService.eps.notAllowedRATTypes}">
<f:selectItem itemLabel="A" itemValue="LAN" />
<f:selectItem itemLabel="B" itemValue="RAN" />
<f:selectItem itemLabel="C" itemValue="GRAN" />
<f:selectItem itemLabel="D" itemValue="GAN" />
<f:selectItem itemLabel="E" itemValue="HION" />
<f:selectItem itemLabel="F" itemValue="CX" />
<f:selectItem itemLabel="G" itemValue="HD" />
<f:selectItem itemLabel="H" itemValue="UB" />
All the items are getting displayed in a single line but I want to display only 3 item in a line? is there any way to do this?

Thanks in Advance.

Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

As far as I know there is no good way to accomplish this without third party libraries. In my old project, we ended up using multiple select many checkboxes, each with their own setters and getters. When a setter was called, it would simply set the list for it's own data field. When we needed a master list, we had a method that would concatenate the two lists and return it. We only needed 2 columns so it was easy to hardcode two selectMany's and use layout="pageDirection" . If you need a dynamic number of rows/columns then I'm not sure what you could do. I hope this helps some.
Posts: 6
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you could use tomahawk lib

and use layout and layoutWidth attribute

Now I am super curious what sports would be like if we allowed drugs and tiny ads.
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!