3 Replies Latest reply on May 29, 2012 7:47 AM by lanthanum

    Please help with rich:select Width

    lanthanum

      Hi,

       

      I am using Richfaces 4.2.0 Final and encounter a problem with rich:select. I cannot set the width of it. According to the following link, it's a defect and can be worked around by overriding the style.

       

      https://issues.jboss.org/browse/RF-10763

       

      I tried to override the input as the following:

       

      <style type="text/css" media="all" >

          input.rf-sel-inp

          {

                width: 100px;

          }

      <style>   

       

      <rich:select value="#{test.name}" listClass="leftAlignSelectList" listWidth="120px">

      <f:selectItems value="#{test.names}" />

      </rich:select>

       

      But the new style did not work and the default style is still in place.

       

      Also, I tried the solution in https://community.jboss.org/wiki/ChangeRichselectsWidth. it worked basically, but not with partial redenering. Whenever the page is rerendered, it lost the width.

       

      Please help!

       

      Thanks in advance.

       

      Steven