我正在尝试在 jqgrid 的搜索字段中添加一个动态下拉列表。我的代码详细信息是::
在jsp页面中:
<s:url var="selecturl" action="selectAction"/>
<sjg:gridColumn name="lastName" index="lastName" title="Last Name" sortable="true" search="true" searchtype="select" searchoptions="{sopt:['eq','ne'], dataUrl : '%{selecturl}'}"/>
在 struts.xml 中:
<action name="selectAction" class="customer.editgridentry.JsonTable">
<result name="success" type="json" />
</action>
在 JsonTable 类中::
public class JsonTable extends ActionSupport implements Preparable {
public Map mySearchValuesList;// = new HashMap<String, String>();
public Map<String, String> getMySearchValuesList() {
return mySearchValuesList;
}
public void setMySearchValuesList(Map<String, String> mySearchValuesList) {
this.mySearchValuesList = mySearchValuesList;
}
@Override
public void prepare() throws Exception {
mySearchValuesList = new HashMap<String, String>();
mySearchValuesList.put("1", "One");
mySearchValuesList.put("2", "Two");
mySearchValuesList.put("3", "Three");
}
........
}
但这表明:
类型错误:e 未定义
谁能告诉我,问题出在哪里...
提前致谢