的问题
我尝试按照以下示例运行代码:
http:// /www.mkyong.com/struts2/struts-2-sselect-drop-down-box-example/
但收到错误消息:
Error 500: tag 'select', field 'list', name 'yourSearchEngine': The requested list key 'searchEngine' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location]
我该如何修复它? 谢谢和问候!
I tried run code follow the example below:
http://www.mkyong.com/struts2/struts-2-sselect-drop-down-box-example/
but it's getting error message:
Error 500: tag 'select', field 'list', name 'yourSearchEngine': The requested list key 'searchEngine' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location]
How can i fix it?
Thanks and regards!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的操作需要一个名为 yourSearchEngine 的公共方法,其类型为集合/数组/映射/枚举/迭代器。或者是上述类型的名为 yourSearchEngine 的私有方法,并定义了适当的 getter。还要确保您的搜索引擎已初始化。
Your action need either a public method called yourSearchEngine which is of type collection/array/map/enumeration/iterator. Or a private method called yourSearchEngine of the aforementioned types with a proper getter defined. Also ensure yourSearchEngine has been initialized.
这意味着在您看来,无论您在何处尝试迭代 ArrayList 或任何其他集合,字段“list”都不会获取任何集合。
可能您正在尝试迭代
中的列表。我也遇到这个问题了。还可以尝试清理您的项目。
This means in your view, whereever you are trying to iterate an ArrayList or any other collection, the field "list" is not getting any Collection.
May be you are trying to iterate a List in
<s:select>
.I got this problem too. Also try cleaning your Project.