jsp页面:
select控件:
<s:select name="sex" list="sexList" listKey="id" listValue="text" headerKey="null" headerValue="请选择..." value="null"></s:select>action:
List sexList = new LinkedList();
sexList = userService.getSexList(); //获得性别列表,下拉框使用
正常打开jsp页面没问题
提交时,执行验证框架,验证未通过,返回input,也就是上面的页面,然后提示错误:
tag 'select', field 'list', name 'sex': The requested list key 'sexList' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name}这个要怎么解决
select控件:
<s:select name="sex" list="sexList" listKey="id" listValue="text" headerKey="null" headerValue="请选择..." value="null"></s:select>action:
List sexList = new LinkedList();
sexList = userService.getSexList(); //获得性别列表,下拉框使用
正常打开jsp页面没问题
提交时,执行验证框架,验证未通过,返回input,也就是上面的页面,然后提示错误:
tag 'select', field 'list', name 'sex': The requested list key 'sexList' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name}这个要怎么解决
解决方案 »
- ajax技术的常用场合和常见应用,希望大家分享自己的代码,为每种情况举个例子
- validator页面验证 急!!!!!!!!!!
- struts logic:iterate使用时出现Cannot create iterator for this collection错误
- struts2 web.xml配置问题
- 求助,socket与jms接口
- webwork+Hibernate+spring写数据库问题
- hibernate3.1.1出现“org.hibernate.MappingException: Could not read mappings from resource:”错误
- 权限菜单缓存问题?
- dom4j中获取一个注释节点?
- JDK1.5的RMI可以不用生成Stub文件?
- 在达内培训做电信DMS 客户类遇到的问题 希望哪个大哥能指点下 谢谢
- JSP权限控制?
并且保证
sexList在request里
1.在验证失败后,赋sexList值;
2.验证失败后,跳到提示页面,要点击"返回"链接才能返回重新填写.当然用dwr是最好的了.
请问验证失败后,怎么赋sexList值?
使用了验证框架,失败了默认就找input