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



struts2-core-2.2.1.1.jar
struts2-dojo-plugin-2.1.8.1.jar
struts2-json-plugin-2.2.1.jar


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="http://ift.tt/Tb0L7s" %>

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


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


http://ift.tt/1qAb8CU


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?







http://ift.tt/1xkhlDr