4 Replies Latest reply on Sep 26, 2008 7:33 AM by ajanz

    suggestionbox rendered with scrollbars

    ajanz

      i got this simple suggestionbox

       <rich:suggestionbox width="280" height="50"
       usingSuggestObjects="true" id="selectlist" for="selmember"
       suggestionAction="#{Session.suggestMember}" var="s"
       fetchValue="#{s}" shadowOpacity="4"
       border="1" minChars="2"
       shadowDepth="4" cellpadding="2" >
       <h:column>
       <h:outputText value="#{s}" styleClass="outputtext_read" />
       </h:column>
      
       </rich:suggestionbox>
      
      


      when it renders suggestions, the suggestions have a horizontal and vertical scrollbar. how can i avoid that?


        • 1. Re: suggestionbox rendered with scrollbars
          ilya_shaikovsky

          change the size attributes values. ;)

          • 2. Re: suggestionbox rendered with scrollbars
            ajanz

            but how to compute the right size?

            number of entries * font size= height?

            suggestionbox behaves a litte strange on different sizes. at the moment the suggestions got no background...dont know why

            • 3. Re: suggestionbox rendered with scrollbars
              ilya_shaikovsky

              we could not calculate the sizes dynamically because you could put any content to column (e.g. images with different height). So you have to define witdth and height. And if the content will have larger sizes - scrolles will appears.

              • 4. Re: suggestionbox rendered with scrollbars
                ajanz

                do you have an idea why there is no background at the moment ?

                 <rich:suggestionbox width="270" height="#{Session.suggestListHeight}"
                 usingSuggestObjects="true" id="selectlist" for="selmember"
                 suggestionAction="#{Session.suggestMember}" var="s"
                 fetchValue="#{s}" shadowOpacity="4"
                 border="1" minChars="2"
                 shadowDepth="4" cellpadding="2" >
                 <h:column>
                 <h:outputText value="#{s}" styleClass="outputtext_read" />
                 </h:column>
                
                 </rich:suggestionbox>
                


                the suggestion texts appears with transparent background