SelectOneMenu: label attribute not working
See original GitHub issue1) Environment
- PrimeFaces version: 7.0.0
- Application server + version: JBoss EAP 7.1.1
- Affected browsers: IE11, Chrome 75
2) Expected behavior
The label of the selectonemenu is “Hello World”
3) Actual behavior
The label is the itemLabel of the selected entry.
4) Steps to reproduce
Just run the xhtml.
5) Sample XHTML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title></title>
</h:head>
<h:body>
<p:selectOneMenu label="Hello World">
<f:selectItem itemValue="YELLOW" itemLabel="Yellow" />
<f:selectItem itemValue="BLUE" itemLabel="Blue" />
<f:selectItem itemValue="RED" itemLabel="Red" />
</p:selectOneMenu>
</h:body>
</html>
6) Sample bean
None
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
SelectOneMenu label is "covered" - jsf - Stack Overflow
Actually it's not working when the url is not matching the page. Solution : concat view id with "?faces-redirect=true" in action attribute of...
Read more >SelectOneMenu - PrimeFaces Showcase
SelectOneMenu is used to choose a single item from a list. ... class="field col-12 md:col-4"> <p:outputLabel value="Label"/> <p:selectOneMenu id="labeled" ...
Read more >SelectOneMenu output display problem - JBoss.org
Hi all, I'm facing a problem with selectOneMenu when populating it with a list. in my xhtml page i have the following code....
Read more >primefaces - issue #7845 - Google Code
CSV selectonemenu not updating label with error style ... Because the ID added to the FOR attribute in the HTML code corresponds to...
Read more >Using the f:selectItem and f:selectItems Tags
The itemValue attribute represents the default value for the selectItem tag. The itemLabel attribute represents the String that appears in the drop-down menu ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If thats ok for you, i would be a happy to apply a PR again, which considers this option and also a docu update of course
Yes why not, I’ll give it a try