栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

带选择框的Struts2 jQuery Autocompleter

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

带选择框的Struts2 jQuery Autocompleter

做这个

<s:url id="remoteurl" action="test"/><sj:select      id="customersjsonlstid"      name="echo"     label="Handle a List"     href="%{remoteurl}"      list="itemList"     listValue="name"      listKey="id"      autocomplete="true"       loadMinimumCount="2"      id="echo3"/>

代替这个

<sj:autocompleter href="%{remoteurl}" id="echo3" name="echo"list="itemList" listKey="id" listValue="name" emptyOption="true"headerKey="-1" headerValue="Please Select a Language" selectBox="true" />

并确保您要从操作类中返回列表。要进行检查,请使用IDE调试器或System.out.print等进行。

ex...    -------------    ------------    itemList.add(new ListValue("Mysl", "Mysl") );    System.out.println("Size of my list="+itemList.size());    return SUCCESS;}

另外,您还应在动作类中定义吸气剂和吸气剂

private List itemList;     public List getItemList() {    return itemList;}public void setItemList(List itemList) {    this.itemList = itemList;}


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/447307.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号