• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Chaging the layout (pageDirection/lineDirection) of the HtmlSelectOneRadio

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a jsf page, where i include radio buttons as shown below to display US states



As the number of states is "50", i cannot use the layout pageDirection/lineDirection. In either case, the page becomes extended.

Instead, i want to create a custom radion button component, in which i get the user input to show the buttons as a matrix (a x b), where a is number of rows
and b is numer of columns. So, i can display the US states as a 5 x 10 matrix. Here, US states is an example. I want to create a reusable component solving my problem.

What's the best way to create a custom component? I am a new bee to JSF.
1. Overriding HtmlSelectOneRadio (or)
2. Creating a new Custom component, overriding UIComponenBase - here i am not sure if i can include event listeners to the radio buttons.

Please advise.

Thanks in advance.
Stalin
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

MyFace does have a solution for this. Try to use its tomahawk tag <t:selectOneRadio> by setting layout property as "spread", then use <t:panelGrid> to layout the items.
Based on your requirement, the code can be as follows:

reply
    Bookmark Topic Watch Topic
  • New Topic