0 Replies Latest reply on Sep 16, 2009 9:56 AM by Johan Borchers

    How to set the width of columns in a suggestionbox?

    Johan Borchers Newbie

      Hello,

      Is it possible to set the width of the table TD's of the generated suggestionbox?

      The first code example is just adding 2 columns but they are spread over the table width resulting in to much space for the code column.

      
      <h:column>
       <f:facet name="header">
       <h:outputText value="Code"/>
       </f:facet>
       <h:outputText value="#{emp.key}"/>
      </h:column>
      <h:column>
       <f:facet name="header">
       <h:outputText value="Naam"/>
       </f:facet>
       <h:outputText value="#{emp.name}"/>
      </h:column>
      
      


      In the next code example I try to limit the column with with a DIV. It helps a litle but what I really want is setting the width of the column.

      
      <h:column>
       <f:facet name="header">
       <h:outputText value="Code"/>
       </f:facet>
       <div style="overflow: hidden; width: 80px;">
       <h:outputText value="#{emp.key}"/>
       </div>
      </h:column>
      <h:column>
       <f:facet name="header">
       <h:outputText value="Naam"/>
       </f:facet>
       <div style="overflow: hidden; width: 180px;">
       <h:outputText value="#{emp.name}"/>
       </div>
      </h:column>
      
      


      The resulting HTML looks like below and it looks like that there should be a possibility to add a style to the TD because of "style=";""


      
      <td nowrap="nowrap" class="dr-sb-cell-padding rich-sb-cell-padding richfaces_suggestionSelectValue" style=";">
      </td>
      
      




      T.I.A.

      Johan Borchers