The width option of the style attribute in rich:select does not work

Solution Verified - Updated -

Issue

  • The style="width:200px"(for example 200px) does not work in rich:select as follows:
<rich:select value="#{test.test}" style="width:200px" id='myTest'> 
    <f:selectItem itemLabel="2" itemValue="1"/>
    <f:selectItem itemLabel="2" itemValue="2"/>
    <f:selectItem itemLabel="3" itemValue="3"/>
    <f:selectItem itemLabel="4" itemValue="4"/>
    <a4j:ajax event="selectitem" render="myTest txtTest" execute="myTest txtTest"/> 
</rich:select>
<h:selectOneMenu value="#{test.test}" style="width:400px" id='myTestH'> 
    <f:selectItem itemLabel="2" itemValue="1"/>
    <f:selectItem itemLabel="2" itemValue="2"/>
    <f:selectItem itemLabel="3" itemValue="3"/>
    <f:selectItem itemLabel="4" itemValue="4"/>
</h:selectOneMenu>

Environment

  • Red Hat Web Frameworks Toolkit (WFK)

    • 2.5
    • 2.6
  • Red Hat JBoss Enterprise Application Platform (EAP)

    • 6.2.x
    • 6.3.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.