简体   繁体   English

Spring Webflow验证器没有错误消息

[英]Spring webflow validator with no error message

I have spring webflow applicaiton, which has a contact info page and while submitting the form, it goes to spring validator. 我有spring webflow应用程序,该应用程序具有联系信息页面,并在提交表单时将其提交给spring验证程序。

And executing validations, if any wrong data then we adding a error message to validationcontext. 并执行验证,如果有任何错误的数据,那么我们向验证上下文添加错误消息。 Using ${errorMessags} we list the error messages. 使用$ {errorMessags},我们列出了错误消息。

But I have a scenario where I need to show a warning message to user in middle of page. 但是我有一种情况,我需要在页面中间向用户显示警告消息。 Either through spring validation or spring flowscope variable in Spring Validator 通过Spring Validator中的Spring验证或Spring Flowscope变量

Is there any way to do it? 有什么办法吗?

Thanks in Advance!!! 提前致谢!!!

Why do you want to do that on validator? 为什么要在验证器上执行此操作? Do you want to show that warning in next view? 您是否要在下一个视图中显示该警告?

I guess you could set message in or in to flashScope variable and show it on next page. 我猜您可以在flashScope变量中或其中设置消息,并在下一页显示它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM