1 Reply Latest reply on Jan 29, 2009 6:39 AM by abelevich

    rich:comboBox forces its listWidth upon parent HTML elements

    lukas.eder

      The comboBox's listWidth element seems to render a fixed size in the comboBox's div structure, forcing its parents to render larger than expected. This is annoying, because the comboBox's selection list is supposed to be on a higher layer and thus not having any effect on the surrounding layout.

      This is an example piece of code causing the problem

      <h:panelGrid width="100" border="1">
       <rich:comboBox width="100" listWidth="200">
       <f:selectItem itemValue="asdfasdfasdf asdfasdfasdf" />
       </rich:comboBox>
      </h:panelGrid>
      


      This is how it renders:

      [img]http://www.flickr.com/photos/tschaga/3235525977[/img]

      One can see that the surrounding panelGrid element is forced to the width of the comboBox list, when it should stay at 100 px

      This is a workaround example, valid for firefox only, not IE:

      <h:panelGrid width="100" border="1">
       <rich:comboBox width="100" listWidth="200"
       style="overflow: hidden; width: 100px !important">
      
       <f:selectItem itemValue="asdfasdfasdf asdfasdfasdf" />
       </rich:comboBox>
      </h:panelGrid>
      


      I am using JSF 1.2.09 and RichFaces 3.3.0 GA on Tomcat 6.0.16