The Struts2 jQuery autocompleter
widget with the selectBox=true
enabled to be able to work correctly shouldn't load data remotely. In other words the attribute href="%{countrylist}"
is a culprit of the select box is not working. These two attributes are mutually exclusive. You have to choose between two options either you use a autocompleter
as input box with remote data or as select box but without loading data remotely, because it's loaded from the valueStack
as a normal select
tag.
You can supplement a select box with selectBoxIcon="true"
to make the widget appear smoothly or use a corresponding jQuery theme in the header tag. Try it
<sj:autocompleter selectBox="true" selectBoxIcon="true" list="lstcountry"
listKey="idcountry" listValue="countryname" label="Country"
name="idcountry" />
An example from the struts2 jQuery plugin wiki page.