Hi All,
I am working on web application using struts 2.0.12 version. In my
application there is a need to replace the select tag with autocompleter tag. I
tried many ways using the list which i obtain from the action class and also
tested with static list values but not able to acheive the functionality of
autocompleter tag.
Below is the snippet of my JSP Page code:
<table>
<tr>
<td><span class="label"><s:text name="data_fp" /></span>
<span class="normalRed">*</span><span class="strongtext">:</span></td>
<td><s:select name="area.name" required="true" theme="simple" onchange="return
submitForYY(this.form);" cssStyle="slctPull" headerKey=" " headerValue=""
list="areaList" size="1" listKey="name" listValue="name"
cssStyle="width:446px"/>
</td>
</tr>
<tr>
<td width="150"><span class="label"><s:text name="data_desc" /></span></td>
<td><s:textfield name="area.description" theme ="simple" disabled="true"
size="70" maxlength="150"/>
</td>
</tr>
</table>
Also in the header tag I have included the ajax theme---
<head>
<s:head theme="simple" />
</head>
To acheive the autocompleter tag functionality, I have replaced the above
select tag with autocompleter tag as shown below:
<s:autocompleter loadOnTextChange="true" loadMinimumCount="2"
showDownArrow="false" autoComplete="false" name="area.name" required="true"
theme="simple" onchange="return submitForYY(this.form);" cssStyle="slctPull"
headerKey=" " headerValue="" list="areaList" size="1" listKey="name"
listValue="name" cssStyle="width:446px"/>
Also have tested by replacing the dynamically obtained list with that of the
static values (as shown below) but in vain..
<s:autocompleter loadOnTextChange="true" loadMinimumCount="2"
showDownArrow="false" autoComplete="false" name="fireArea.name" required="true"
theme="simple" onchange="return submitForFPPassive(this.form);"
cssStyle="slctPull" headerKey=" " headerValue=""
list="{'ABC','ABD','BCD','BCF','PQR','PQA'}" size="1" cssStyle="width:446px"/>
My application was completely developed using struts2 framework and javascript.
Not anywhere in the application i have used either DOJOs or AJAX.
The list of web libraries which i am using currently are:
commons-fileupload-1.2.1, commons-io-1.4, commons-logging-1.0.4,
freemarker-2.3.8, mysql-connector-java-5.1.6-bin, ognl-2.6.11, sitemesh-2.3,
struts2-core-2.0.12, xwork-2.0.6
Do i need to include any further libraries for the proper functioning of
autocompleter tag?
Please help me out from this issue.
Thanks,
Tajuddin