StripesRuntimeException:多个事件参数
对不起我糟糕的英语。
我正在使用 Stripes Web Framework,最近出现以下错误:
此请求中存在多个事件参数 [save、managementPreview]。每个请求只能指定一个事件参数。否则,Stripes 将无法确定要执行哪个事件。 net.sourceforge.stripes.exception.StripesRuntimeException:此请求中存在多个事件参数 [save、managementPreview]。每个请求只能指定一个事件参数。否则,Stripes 将无法确定要执行哪个事件。
在我的表单中,我有一个
有人知道为什么 Stripes 提交两个事件吗?这可能是浏览器问题(据我所知,这在 FF 和 IE 7 & 8 中不会发生)?
感谢您的帮助。
此致。
何塞·佩尔迪冈
Sorry my poor English.
I’m using Stripes Web Framework and recently I’ve had the following error:
Multiple event parameters [save, managementPreview] are present in this request. Only one event parameter may be specified per request. Otherwise, Stripes would be unable to determine which event to execute.
net.sourceforge.stripes.exception.StripesRuntimeException: Multiple event parameters [save, managementPreview] are present in this request. Only one event parameter may be specified per request. Otherwise, Stripes would be unable to determine which event to execute.
Inside my form I’ve one <button type=”submit” />
to activate de “managementPreview” event and one <input type=”submit” />
to activate the “save” event.
Anyone know why Stripes submits two events? It may be a browser problem (as far as I know this doesn’t happen in FF and IE 7 & 8)?
Thanks for your help.
Best regards.
José Perdigão
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Stripes是一种服务器端技术,它不涉及提交HTML表单。显然你的 HTML 是不正确的,因此不同的浏览器对它的处理方式不同。
为了创建具有多个提交按钮的正确 HTML 表单,为每个提交按钮提供一个引用正确 Stripes 事件名称的
name
属性非常重要。虽然不是强制性的,但使用 Stripes JSP 标记生成正确的 HTML 表单也非常方便。这是一些示例代码:Stripes is a server side technology, it is not involved in submitting the HTML form. Apparently you're HTML is incorrect and as a result it’s handled differently by the different browsers.
For creating a correct HTML form with multiple submit buttons, it's important to give each submit button a
name
attribute that refers to the correct Stripes event name. Although not mandatory, it's also very convenient to use the Stripes JSP tags for generating correct HTML forms. Here’s some example code: