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 8540301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:33:58+00:00 2026-06-11T11:33:58+00:00

I have been attempting to get a Twitter Bootstrap autocompleter working with a Spring

  • 0

I have been attempting to get a Twitter Bootstrap autocompleter working with a Spring MVC annotated controller.

I have the following HTML:

<div class="control-group">
            <label class="control-label" for="name">Supplier</label>
            <div class="controls">
                <input id="supplier" name="supplier" class="input-xlarge" data-provide="typeahead" type="text"/>    
            </div>
        </div>

and the following javascript:

<script src="/resources/js/jquery.js"></script>
    <script src="/resources/js/bootstrap.js"></script>
    <script type="text/javascript">

    $('#supplier').typeahead({
        source: function (query, process) {
            return $.get('http://localhost:8080/supplier/search', { query: query }, function (data) {
                return process(data);
            });
        },

        minLength : 3,
        items : 4,
        property: 'name'
    });
    </script>

when a type three letters I am seeing the correct request to my controller which is returning a single supplier object as JSON:

{"supplier":{"name":"test","id":0,"version":0,"url":null}}

However, the text field is not showing the returned supplier. Can anyone provide any help as to why this isn’t working?

  • 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-11T11:34:00+00:00Added an answer on June 11, 2026 at 11:34 am

    process() expects an array of strings instead of an array of objects. Thus, instead of passing it an object, pass it an array with the contents that you want to be shown on the text field, i.e., [ "test" ].

    Also, as a suggestion, to use typeahead with remote sources, I’d suggest using this plugin instead. Amongst other things, it allows you to use an array of objects instead of an array of strings.

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

Sidebar

Related Questions

I have been attempting to get the MySQL Embedded Library working in my C#
I have been attempting to get streaming working in Rails 3.2 on Heroku (see
I have been working on a site lately. I am attempting to get a
I have been attempting to get log4net logging in my asp.net web application with
I have been attempting to debug my program, but it always seems to get
I have been attempting to use ASP.NET MVC remote validation for username login access
I have been attempting to learn Grails, however I am running into the following
I have been attempting to get log4net logging any info or error into my
I have been attempting to split a div into two columns using CSS, but
I have been trying to get a 2-way ssl/https proxy working with Camel. I

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.