How to achieve autocomplete dropdown using struts2-dojo-plugin

Wednesday, July 2, 2014

I want to implement autocomplete dropdown using <sx:autocompleter> in struts2.

The following are the use jar's


The ajaxAutocomplete.jsp

<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
<%@ taglib prefix="c" uri="" %>

<s:form action="ajaxAutoCompleteActionForm" id="ajaxAutocompleteActionForm">
<H1> Bulk Action Form </h1>
<sx:autocompleter size="1" list="countries" name="country"></sx:autocompleter>

After deploying the above code simply shows a normal dropdown with list of countries. There is no <input> field to enter the text. I want to achieve the same behaviour as shown in the following link

Also in my console I am getting the following error

"Uncaught ReferenceError: djConfig is not defined"

What I am doing wrong? How to avoid the console error?

How to get the dropdown with text box to search select option value?