How to set scroll to autocomplete if data is more

UI Components for JSF
Post Reply
shyammanchoju
Posts: 3
Joined: 30 Jun 2010, 14:47

22 Jul 2010, 08:31

Hi,
I have scenario where i need to set scroll bar for p:autocomplete if the data size is more than 10 else it should not display scroll bar.

thanks in advance
Shyammanchoju

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

22 Jul 2010, 11:11

Hi,

Welcome to PrimeFaces!

This can be done with CSS;

Code: Select all

.ui-autocomplete {
   overflow:auto;
   height:100px;
}
I've used 100px for example, for 10 records you need to adjust that.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 41 guests