如何使用PrimeFaces验证码? [英] How to use PrimeFaces Captcha?

查看:73
本文介绍了如何使用PrimeFaces验证码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我仔细阅读了用户指南展示柜,但找不到在后备bean中获得Captcha评估结果的方法。我可以在UI的顶部消息栏上看到结果,但是如何在后备bean中获得结果?

I went through the user guide and the showcase but couldn't find a way to get the Captcha evaluation result in the backing bean. I can see the result on the top message bar on the UI but how to get the result in the backing bean?

推荐答案

I不要以为它对您的豆类有任何效果。如果您在验证码框中输入有效的文本,则流程验证阶段不会引发错误,并且您的输入将被视为有效。否则,验证码组件会提示错误,并且您将看到错误消息,其中包含 h:message h:message 标签。 (也许您应该附加一些代码。)

I don't think that it has any result for your beans. If you type valid text in the captcha box the process validation phase does not throw error and your input will be handled as valid. Otherwise the captcha component signal the error and you will see the error message with the h:message or the h:messages tag. (Maybe you should attach some code.)


如果输入的值无效,则会向
FacesContext添加一条错误消息。如果组件的
标记为无效,则JSF进入渲染响应阶段,这将使
显示当前视图以及验证错误消息。没有验证错误,JSF进入更新模型值
阶段。

"If an entered value is invalid, an error message is added to FacesContext, and the component is marked invalid. If a component is marked invalid, JSF advances to the render response phase, which will display the current view with the validation error messages. If there are no validation errors, JSF advances to the update model values phase."

(来自 http://www.ibm.com/developerworks/library/j-jsf2/

这篇关于如何使用PrimeFaces验证码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆