Questions tagged [selectoneradio]

JSF tag to create a single-select radio button group.

A <h:selectOneRadio> is a JSF UI component which generates a group of HTML <input type="radio"> elements which allows you to bind the selected value to a managed bean property.

Programmatically, it can be used in exactly the same way as <h:selectOneMenu>. Therefore, it's sufficient to just advance to its tag wiki page. You just have to substitute the <h:selectOneMenu> in all examples by <h:selectOneRadio>.

83 questions
23
votes
2 answers

renders table element, how to avoid this?

Is there a way to tell JSF that it should NOT render a element when using ? I don't use tables and it makes absolutely no sense in this case. Any help is appreciated!
m4ri0
  • 597
  • 1
  • 6
  • 10
18
votes
1 answer

Primefaces selectOneRadio ajax

I'm trying to display validation messages everytime the user clicks on a radio button. This only works when I click on the submit button, but not when I click on the radio button:
DD.
  • 21,498
  • 52
  • 157
  • 246
6
votes
4 answers

Adding space between two radio buttons of h:selectOneRadio

In JSF 2.0 I have below
Fahim Parkar
  • 30,974
  • 45
  • 160
  • 276
5
votes
6 answers

How to get the selected option from p:selectOneRadio using javascript

How do you get which radio is selected within p:selectOneRadio using javascript/jquery ? Since the p:selectOneRadio uses no radio tags I have no idea how to get the checked option using CSS selectors.
Rajat Gupta
  • 25,853
  • 63
  • 179
  • 294
5
votes
1 answer

p:selectOneRadio not updating model in event "change" with p:ajax

I'm using an p:selectOneRadio with p:ajax and the value of another component (p:inputText), not binding its value in my bean. If I use p:selectBooleanCheckbox instead the behavior is exactly what I need, update the bean before calling the method in…
Leandro Andrade
  • 51
  • 1
  • 1
  • 3
5
votes
3 answers

How to use h:selectOneRadio in h:dataTable to select single row?

I have list of pages displayed in table. Each page has property homePage and I want in the datatable to have a column of radio buttons to be binded on this property, and the user can only check one value. How can I get this value on server side? I…
Mahmoud Saleh
  • 33,303
  • 119
  • 337
  • 498
4
votes
1 answer

How to set the value of p:selectOneRadio with Client Side API?

In my JSF view I am using a p:selectOneRadio. Now I have to change the value of this component on client side as side effect. In the Client Side API of this component I have found the following which I think I could use for this if I find the proper…
stg
  • 2,757
  • 2
  • 28
  • 55
3
votes
1 answer

"Validation Error: Value is not valid" error from f:datetimeConverter

The following code creates a two radio buttons. Each option contains a date value that is successfully converted to a label of the format "yyyy-MM-dd". Once I make a selection and click the next button I get the following error…
Wayne
  • 149
  • 3
  • 14
3
votes
1 answer

Customize layout and labels of h:selectOneRadio with other components

I'd like to customize the default layout of . In my case, I need to put a after every radio button. This is what I have so far:
user3407440
  • 183
  • 1
  • 2
  • 15
3
votes
1 answer

Execute Backing Bean Action on p:selectOneRadio

I'm using a radio component on which, when selecting an item I want to execute an action on backing bean (not navigate to an outcome page, but to perform some action and then update current page via Ajax). Problem is I can't get the backing bean…
Rodrigo Martinez
  • 913
  • 3
  • 13
  • 29
3
votes
0 answers

ValueChangeListener is not working on SelectOneRadio JSF

I have a selectOneRadio and i have binded this with ValueChangeListener. But the Listener is not getting called on SelectOneRadio. I am able to call this on SelectOneMenu. Please help me on this
Siva
  • 1,938
  • 1
  • 17
  • 36
3
votes
2 answers

Using an image as a label of p:selectOneRadio

Given the following list of .
Tiny
  • 27,221
  • 105
  • 339
  • 599
3
votes
1 answer

Primefaces SelectOneRadio with an noSelectionOption selected

How can I have a selectOneRadio with an noSelectionOption which is selected by default? I have the following:
3
votes
2 answers

Add styling to label generated by selectOneRadio

How to add radio-inline control-label style classes to the label generated by this code?
perak
  • 1,310
  • 5
  • 20
  • 31
3
votes
1 answer

h:selectOneRadio renders all select items in one line, how to render each in new line?

I have a selectOneRadio tag and all radio button options are displayed on one row. How can I make it one option per row/line?
user1414745
  • 1,317
  • 6
  • 25
  • 45
1
2 3 4 5 6