Amit Das
Amit Das

Reputation: 1107

Struts 2 autocompleter not working as dropdown

I have a JSP page in which I have use sx:autocompleter. It is working but at the time of typing in textbox, suggestions are not coming in dropdown, they are coming as completing the word. Like this

What is the problem here ?

enter image description here

Upvotes: 0

Views: 755

Answers (1)

Roman C
Roman C

Reputation: 1

Use <sj:autocompleter> instead.

The Autocompleter widget renders a HTML input or select box with.

<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<html>
  <head>
    <sj:head jqueryui="true"/>
  </head>
  <body>
    <sj:autocompleter
            id="customers"
            name="echo"
            list="%{customers}"
            listValue="name"
            listKey="id"
            selectBox="true"
    />
  </body>
</html>

Upvotes: 2

Related Questions