Repository: primefaces/primefaces (java)

Issue:
SelectOneMenu: Not handling `readonly` property correctly
### Describe the bug

SelectOneMenu is missing readonly even though its partially supported and you can't submit a SelectOneMenu that is readonly it does get ignored by Faces so that is good.  However.

1. The hidden `select` should be marked readonly (its what `<h:selectOneMenu>` does
2. CSS class of `ui-state-readonly` should be added to the Div so it can be styled similar to what we did with SelectOneRadio.
3. `readonly` is missing from the Tag Library XML.

### Reproducer

[pf-selectonemenu.zip](https://github.com/user-attachments/files/16967704/pf-selectonemenu.zip)


### Expected behavior

Stated above

### PrimeFaces edition

Community

### PrimeFaces version

14.0.5

### Theme

ALL

### JSF implementation

Mojarra

### JSF version

2.3

### Java version

11

### Browser(s)

ALL

Pull request description:
Fix #12584: 14.0.6 SelectOneMenu support readonly attribute
Fix #12584: 14.0.6 SelectOneMenu support readonly attribute

Patch:
diff --git a/pom.xml b/pom.xml
index bbc5d19bf7..e4ebc3d61f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
     <groupId>org.primefaces</groupId>
     <artifactId>primefaces-parent</artifactId>
     <packaging>pom</packaging>
-    <version>14.0.5</version>
+    <version>14.0.6-SNAPSHOT</version>
 
     <name>PrimeFaces Parent</name>
     <url>https://www.primefaces.org</url>
diff --git a/primefaces-cli/pom.xml b/primefaces-cli/pom.xml
index 458636bed4..13693a16f5 100644
--- a/primefaces-cli/pom.xml
+++ b/primefaces-cli/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.primefaces</groupId>
         <artifactId>primefaces-parent</artifactId>
-        <version>14.0.5</version>
+        <version>14.0.6-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
diff --git a/primefaces-selenium/pom.xml b/primefaces-selenium/pom.xml
index 6fd1f57a76..6fc8b78aaf 100644
--- a/primefaces-selenium/pom.xml
+++ b/primefaces-selenium/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.primefaces</groupId>
         <artifactId>primefaces-parent</artifactId>
-        <version>14.0.5</version>
+        <version>14.0.6-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
diff --git a/primefaces-selenium/primefaces-selenium-components/pom.xml b/primefaces-selenium/primefaces-selenium-components/pom.xml
index ac0f94995e..d1cfcb4a8a 100644
--- a/primefaces-selenium/primefaces-selenium-components/pom.xml
+++ b/primefaces-selenium/primefaces-selenium-components/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.primefaces</groupId>
         <artifactId>primefaces-selenium</artifactId>
-        <version>14.0.5</version>
+        <version>14.0.6-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
diff --git a/primefaces-selenium/primefaces-selenium-core/pom.xml b/primefaces-selenium/primefaces-selenium-core/pom.xml
index 8759a83778..8ab86e725e 100644
--- a/primefaces-selenium/primefaces-selenium-core/pom.xml
+++ b/primefaces-selenium/primefaces-selenium-core/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.primefaces</groupId>
         <artifactId>primefaces-selenium</artifactId>
-        <version>14.0.5</version>
+        <version>14.0.6-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
diff --git a/primefaces-showcase/pom.xml b/primefaces-showcase/pom.xml
index 24e15f0426..f41d0e3808 100644
--- a/primefaces-showcase/pom.xml
+++ b/primefaces-showcase/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.primefaces</groupId>
         <artifactId>primefaces-parent</artifactId>
-        <version>14.0.5</version>
+        <version>14.0.6-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
diff --git a/primefaces-showcase/src/main/java/org/primefaces/showcase/menu/AppMenu.java b/primefaces-showcase/src/main/java/org/primefaces/showcase/menu/AppMenu.java
index 1c9032c03d..d28aedcf41 100644
--- a/primefaces-showcase/src/main/java/org/primefaces/showcase/menu/AppMenu.java
+++ b/primefaces-showcase/src/main/java/org/primefaces/showcase/menu/AppMenu.java
@@ -72,7 +72,6 @@ public class AppMenu {
         //THEMING CATEGORY START
         List<MenuItem> themingMenuItems = new ArrayList<>();
         themingMenuItems.add(new MenuItem("Overview", "/theming"));
-        themingMenuItems.add(new MenuItem("Visual Editor", "https://www.primefaces.org/designer-jsf"));
         themingMenuItems.add(new MenuItem("Colors", "/colors"));
         themingMenuItems.add(new MenuItem("SASS API", "https://www.primefaces.org/designer/api/primefaces/13.0.0/"));
         menuCategories.add(new MenuCategory("Theming", themingMenuItems));
diff --git a/primefaces/pom.xml b/primefaces/pom.xml
index 52599d0005..615683e788 100644
--- a/primefaces/pom.xml
+++ b/primefaces/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.primefaces</groupId>
         <artifactId>primefaces-parent</artifactId>
-        <version>14.0.5</version>
+        <version>14.0.6-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
diff --git a/primefaces/src/main/java/org/primefaces/component/selectonemenu/SelectOneMenuRenderer.java b/primefaces/src/main/java/org/primefaces/component/selectonemenu/SelectOneMenuRenderer.java
index 9ebe5c3c32..6b9048d59b 100644
--- a/primefaces/src/main/java/org/primefaces/component/selectonemenu/SelectOneMenuRenderer.java
+++ b/primefaces/src/main/java/org/primefaces/component/selectonemenu/SelectOneMenuRenderer.java
@@ -118,10 +118,11 @@ public class SelectOneMenuRenderer extends SelectOneRenderer {
 
         String style = menu.getStyle();
         String styleClass = createStyleClass(menu, SelectOneMenu.STYLE_CLASS);
-
-        if (ComponentUtils.isRTL(context, menu)) {
-            styleClass = styleClass + " " + SelectOneMenu.RTL_CLASS;
-        }
+        styleClass = getStyleClassBuilder(context)
+                .add(styleClass)
+                .add(ComponentUtils.isRTL(context, menu),  SelectOneMenu.RTL_CLASS)
+                .add(menu.isReadonly(), "ui-state-readonly")
+                .build();
 
         writer.startElement("div", menu);
         writer.writeAttribute("id", clientId, "id");
@@ -198,6 +199,9 @@ public class SelectOneMenuRenderer extends SelectOneRenderer {
         if (menu.isDisabled()) {
             writer.writeAttribute("disabled", "disabled", null);
         }
+        if (menu.isReadonly()) {
+            writer.writeAttribute("readonly", "readonly", null);
+        }
         if (menu.getOnkeydown() != null) {
             writer.writeAttribute("onkeydown", menu.getOnkeydown(), null);
         }
diff --git a/primefaces/src/main/resources/META-INF/primefaces.taglib.xml b/primefaces/src/main/resources/META-INF/primefaces.taglib.xml
index d53918b8ea..fc75582af4 100644
--- a/primefaces/src/main/resources/META-INF/primefaces.taglib.xml
+++ b/primefaces/src/main/resources/META-INF/primefaces.taglib.xml
@@ -24883,12 +24883,20 @@
         </attribute>
         <attribute>
             <description>
-                <![CDATA[]]>
+                <![CDATA[Flag indicating whether the component should be disabled.]]>
             </description>
             <name>disabled</name>
             <required>false</required>
             <type>boolean</type>
         </attribute>
+        <attribute>
+            <description>
+                <![CDATA[Flag indicating that this input element will prevent changes by the user.]]>
+            </description>
+            <name>readonly</name>
+            <required>false</required>
+            <type>boolean</type>
+        </attribute>
         <attribute>
             <description>
                 <![CDATA[Always display the 'label' value instead of the selected item label. Default is false.]]>
@@ -24915,7 +24923,7 @@
         </attribute>
         <attribute>
             <description>
-                <![CDATA[]]>
+                <![CDATA[Client side callback to execute when the value changes.]]>
             </description>
             <name>onchange</name>
             <required>false</required>
@@ -24923,7 +24931,7 @@
         </attribute>
         <attribute>
             <description>
-                <![CDATA[]]>
+                <![CDATA[Inline style of the component.]]>
             </description>
             <name>style</name>
             <required>false</required>
@@ -24931,7 +24939,7 @@
         </attribute>
         <attribute>
             <description>
-                <![CDATA[]]>
+                <![CDATA[Style class of the component.]]>
             </description>
             <name>styleClass</name>
             <required>false</required>
@@ -24971,7 +24979,7 @@
         </attribute>
         <attribute>
             <description>
-                <![CDATA[]]>
+                <![CDATA[Position of the element in the tabbing order.]]>
             </description>
             <name>tabindex</name>
             <required>false</required>
@@ -24979,7 +24987,7 @@
         </attribute>
         <attribute>
             <description>
-                <![CDATA[]]>
+                <![CDATA[When true, allows the user to edit the dropdown value by typing directly into the input field.]]>
             </description>
             <name>editable</name>
             <required>false</required>
@@ -24987,7 +24995,7 @@
         </attribute>
         <attribute>
             <description>
-                <![CDATA[]]>
+                <![CDATA[Client side callback to execute when a key is pressed down.]]>
             </description>
             <name>onkeydown</name>
             <required>false</required>
@@ -24995,7 +25003,7 @@
         </attribute>
         <attribute>
             <description>
-                <![CDATA[]]>
+                <![CDATA[Client side callback to execute when a key is released.]]>
             </description>
             <name>onkeyup</name>
             <required>false</required>
diff --git a/primefaces/src/main/resources/META-INF/resources/primefaces/forms/forms.css b/primefaces/src/main/resources/META-INF/resources/primefaces/forms/forms.css
index d0aef1bcd7..595adab3da 100644
--- a/primefaces/src/main/resources/META-INF/resources/primefaces/forms/forms.css
+++ b/primefaces/src/main/resources/META-INF/resources/primefaces/forms/forms.css
@@ -1012,7 +1012,7 @@ body .ui-cascadeselect-item-content .ui-cascadeselect-group-icon {
 }
 
 /** Calendar **/
-.ui-fluid .ui-calendar, .ui-fluid .ui-calendar input {
+.ui-fluid .ui-calendar, .ui-fluid .ui-calendar > input {
     width: 100%;
 }
 


Test patch:
diff --git a/primefaces-integration-tests-jakarta/pom.xml b/primefaces-integration-tests-jakarta/pom.xml
index 9eca205192..39f29c7c34 100644
--- a/primefaces-integration-tests-jakarta/pom.xml
+++ b/primefaces-integration-tests-jakarta/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.primefaces</groupId>
         <artifactId>primefaces-parent</artifactId>
-        <version>14.0.5</version>
+        <version>14.0.6-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
diff --git a/primefaces-integration-tests/pom.xml b/primefaces-integration-tests/pom.xml
index bcabf3f417..bfd346a7d0 100644
--- a/primefaces-integration-tests/pom.xml
+++ b/primefaces-integration-tests/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.primefaces</groupId>
         <artifactId>primefaces-parent</artifactId>
-        <version>14.0.5</version>
+        <version>14.0.6-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>