开发者

struts 2 autocompleter

<ajax:autocompleter name="cityName" list="list" size="1" label="Select City" 
    listValue="cityName" listKey="id" autoComplete="true"></ajax:autocompleter>

i am using struts 2 with ajax but its not开发者_Python百科 working


&lt;%@ taglib prefix="ajax" uri="/struts-dojo-tags"%>

**&lt;ajax:head  />**


&lt;ajax:autocompleter name="cityName" list="list" size="1" label="Select City" 
    listValue="cityName" listKey="id" autoComplete="true"></ajax:autocompleter>

Make sure <ajax:head/> is in the <head></head> of the jsp. It generates the required code for autogeneration.


you should use struts url tag to call an action which gives u json object as list

<s:url id="List" action="/actionName" method="methodName" />
<sx:autocompleter id="itemC" href="%{List}" forceValidOption="true" preload="true"
size="24" name="item" autoComplete="false" showDownArrow="false"    
valueNotifyTopics="/value"></sx:autocompleter>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜