4 Replies Latest reply on Dec 9, 2011 2:24 PM by u j

    Controlling column widths of rich:autocomplete?

    Scott Balmos Newbie



      I'm currently finishing up a migration of <rich:suggestionbox> in our 3.3 app to <rich:autocomplete> in a 4.0 version. However, with <rich:suggestionbox>, we could control the widths of the individual columns that made up the suggestion box - namely so that the text contents would not word-wrap. I have tried everything I can think of to change the column widths with <rich:autocomplete>, to no real success. At best, I can change the width of the popup box overall. But the columns do not expand to use the extra width. They seem to be hard-coded to some width, causing the text inside to word-wrap. New code is below:


                  <rich:autocomplete id="employeeSearchName" mode="ajax" minChars="3"

                                     autocompleteMethod="#{employeeSearchBean.searchEmployees}" var="emp"

                                     autofill="false" layout="table"

                                     fetchValue="#{emp.employee.id}" value="#{employeeSearchBean.selectedEmployeeName}"

                                     onselectitem="chooseEmployee()" popupClass="popup">

                      <rich:column style="width: 100px">

                          <h:outputText value="#{emp.maskedSsn}" styleClass="#{emp.displayStyle}"/>


                      <rich:column style="width: 175px">

                          <h:outputText value="#{emp.nameLfm}" styleClass="#{emp.displayStyle}"/>


                      <rich:column style="width: 175px">

                          <h:outputText value="#{emp.companyLocation}" styleClass="#{emp.displayStyle}"/>




      No matter whether I use style="width: ?", width="?", or any attributes on the individual <rich:column> definitions, the width is always the same - too short for our visual desires.


      Can anyone throw a hint at what's required? Thanks.