Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

h:selectOneRadio doesn't render the value of styleClass when the group attribute is specified #5507

Closed
eproffit2 opened this issue Sep 17, 2024 · 1 comment
Milestone

Comments

@eproffit2
Copy link

As stated in the [vdldoc ] :

If the "group" attribute is specified, render as follows. If the "styleClass" attribute is specified, render the value of the "styleClass" attribute as the value of the "class" attribute on the "input" element.

As of version 4.0.7, the styleClass isn't rendered. There is the same problem for the style attribute.
There is the same issue with the "style" attribute.

To Reproduce :
Create a page with 2 simple selectOneRadio as bellow :

<h:selectOneRadio id="radio1" group="myGroup" value="#{flash.toto}" styleClass="myClass1">
	<f:selectItem itemValue="1" itemLabel="Label 1"/>
</h:selectOneRadio>
<h:selectOneRadio id="radio2" group="myGroup" value="#{flash.toto}" styleClass="myClass2">
	<f:selectItem itemValue="2" itemLabel="Label 2"/>
</h:selectOneRadio>

The input elements rendered are without the class attribute (which should be the value of styleClass).

Expected behavior :

<input type="radio" name="myform:myGroup" id="radio1" value="radio1:1" class="myClass1"><label for="radio1"> Label 1</label>
<input type="radio" name="myform:myGroup" id="radio2" value="radio2:2" class="myClass2"><label for="radio2"> Label 2</label>
@BalusC
Copy link
Contributor

BalusC commented Sep 19, 2024

Fixed. Thank you very much for reporting!

BalusC added a commit that referenced this issue Sep 19, 2024
BalusC added a commit that referenced this issue Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants