Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7911281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:10:59+00:00 2026-06-03T13:10:59+00:00

I have primefaces autocomplete which is fetching values from database. When I type in

  • 0

I have primefaces autocomplete which is fetching values from database.
When I type in characters, I could see rows in autocomplete are sometimes appearing above
<p:autoComplete, it should appear normally below <p:autoComplete.

See below screenshot for reference. How can I resolve this issue?

Primesfaces version 3.1

JSF code

<p:autoComplete value="#{bean.selectedEmployees}"  
 completeMethod="#{bean.employeeList}"  
        var="vs" itemLabel="#{vs.empName}" itemValue="#{vs.empName}"  multiple="true"> 

        <p:column style="width:100%;text-align:center">  
            #{vs.empName} - #{vs.empNumber}  
        </p:column>  
    </p:autoComplete> 

Regards

enter image description here

Update 1

ManagedBean

public List<Schedules> employeeList(String query) {

for(Schedules vs : employees) {  
                if(vs.getEmpName().toLowerCase().startsWith(query.toLowerCase()))  
                    suggestions.add(vs);    
            }
return suggestions;

and in constructor

employees = MyDAO.loadEmployees();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:11:02+00:00Added an answer on June 3, 2026 at 1:11 pm

    I had the same problem. I believe the reason is when you have a large suggestion list, primefaces sees it can’t fit within the browser boundary if it was displayed downwards, so it just blindly flip the dropdown upwards. (which possibly makes it worse) Try add scrollHeight to limit the dropdown length although I heard scrollHeight also has its own problem

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I understand that Primefaces Layout and Dashboard have state which can be saved. Could
i have problem with load data from Database i use Primefaces (or other use
I have difficulty in removing border from a specific PrimeFaces <p:panelGrid> . <p:panelGrid styleClass=companyHeaderGrid>
I'm using primefaces' accordion panel. Inside the tabs i have forms which are created
I am trying to retrieve a set of values from database and assigned it
I have a primefaces datatable: <p:dataTable id=idCrawledDataTable var=crawledData value=#{crawlerCorpusTreatmentBean.crawledDataModel} rowKey=#{crawledData.id} rows=10 scrollable=true scrollHeight=300 selection=#{crawlerCorpusTreatmentBean.crawledData}
I have a List<MyDto> which I want to export with PrimeFaces. I tried with
I have four lists in my webflow, which I load from my service layer.
I have several different primefaces dialogs and I've implemented a close listener which receives
I have a Primefaces dataTable with rowEdit. Two columns contain a selectOneMenu control in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.