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

  • SEARCH
  • Home
  • 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 8506943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:43:50+00:00 2026-06-11T02:43:50+00:00

I am trying autocomplete demo .I am not getting any error but the httprequest/response

  • 0

I am trying autocomplete demo .I am not getting any error but the httprequest/response shows that it is communicating with the server but not to the bean. I am using latest version of primefaces 3.4.

Any help is appreciated.

Bean :

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import com.zreflect.emyed.managedbean.BaseMB;

@ManagedBean
@ViewScoped
public class CircleSearchBean extends BaseMB implements Serializable {
    private static final long serialVersionUID = 1L;
    private String selected;
    List<String> results = new ArrayList<String>();
    public List<String> complete(String query) {
        List<String> results = new ArrayList<String>();
        for (int i = 0; i < 10; i++) {
            results.add(query + i);
        }
        return results;
    }
    /**
     * @return the selected
     */
    public String getSelected() {
        return selected;
    }

    /**
     * @param selected
     *            the selected to set
     */
    public void setSelected(String selected) {
        this.selected = selected;
    }
}

XHTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:head>
    <title><h:outputText value="test" /></title>
</h:head>

<h:body>
<h:form>
<p:autoComplete value="#{circleSearchBean.selected}" completeMethod="#{circleSearchBean.complete}"/> 
</h:form>
</h:body>
</html>

Here’s debug information from Chrome developer tools.

Request:

Request URL:http://localhost:8080/PrimefacesTest/faces/index.xhtml
Request Method:POST
Status Code:200 OK

Request headers:

Accept:application/xml, text/xml, */*; q=0.01
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Content-Length:157
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
Cookie:JSESSIONID=60Wd6aXSj6rDbPOgvMCoFJFF.undefined
Faces-Request:partial/ajax
Host:localhost:8080
Origin:http://localhost:8080
Referer:http://localhost:8080/PrimefacesTest/faces/index.xhtml
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1
X-Requested-With:XMLHttpRequest

Form data:

javax.faces.partial.ajax:true
javax.faces.source:j_idt8
javax.faces.partial.execute:j_idt8
javax.faces.partial.render:j_idt8
j_idt8:j_idt8
j_idt8_query:hello

Response headers:

Cache-Control:no-cache
Content-Length:346
Content-Type:text/xml;charset=UTF-8
Date:Sun, 02 Sep 2012 21:11:42 GMT
Server:Apache-Coyote/1.1
X-Powered-By:JSF/2.0
  • 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-11T02:43:51+00:00Added an answer on June 11, 2026 at 2:43 am

    It is working now as shown in demo after adding the “id” attribute to autocomplete.

    <p:autoComplete id="autocomplete" value="#{circleSearchBean.selected}" 
       completeMethod="#{circleSearchBean.complete}"/>  
    

    In a seperate project it is working without an “id” attribute. Looks like a bug.

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

Sidebar

Related Questions

I am trying to use autocomplete from http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.js but am getting this error. textbox
Trying to get an autocomplete to work an a textbox but it seems that
using jquery ui 1.8 trying autocomplete Everything works apart from that the ui-menu isn't
Trying to use autocomplete functionality of YUI, we ran into the fact that it's
I`m trying to add autocomplete to a field that is included in a partial
I am trying to get autocomplete working working with JQuery UI, but I am
I'm trying to implement autocomplete for a textbox using the following code, but it's
I am trying to use autocomplete which call a method on the server to
Hello i'm trying to use autocomplete dropdownlist plugin that name is ufd. Anyway, I
I'm trying to do an autocomplete to my textbox, but it doesn't work. Follow

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.