Captcha在2.0.1GA的改变

xxqn 2008-03-04
2.0的引用代码
<div>
    <h:graphicImage value="/seam/resource/captcha?#{captcha.id}"/>
</div>

<div>
    <h:outputLabel for="verifyCaptcha">Enter the above letters</h:outputLabel>
    <h:inputText id="verifyCaptcha" value="#{captcha.response}" required="true">
      <s:validate />
    </h:inputText>
    <div class="validationError"><h:message for="verifyCaptcha"/></div>
</div>


2.0.1GA改了一点
<h:graphicImage value="/seam/resource/captcha"/>

同时验证方式也改了,原来是输入图片的文字,改为将图片中的运算公式的结果。公式图片没有干扰纹,2.0的图片文字不清楚,经常判断错误。
打倒小日本 2008-03-13
刚升级到2.0.1GA 得注意下 谢谢
little51 2008-06-17
楼主,请教个问题,captcha的错误提示能够汉化吗?
打倒小日本 2008-09-25
little51 写道
楼主,请教个问题,captcha的错误提示能够汉化吗?

可以
<h:graphicImage value="/seam/resource/captcha"/>
<h:inputText id="verifyCaptcha" value="#{captcha.response}" required="true" requiredMessage="必填" validatorMessage="错误">
	<s:validate />
</h:inputText>
<rich:message for="verifyCaptcha" />
little51 2008-09-25
多谢,我试试。我在VerifyCaptcha.java按下面方法写,不稳定,有时是汉字,有时是英文。
@Name("org.jboss.seam.captcha.captcha")
@Scope(ScopeType.SESSION)
@Install(precedence = Install.APPLICATION)
public class VerifyCaptcha extends Captcha {
... ...
@CaptchaResponse(message = "验证码不正确!")
@Override
public String getResponse() {
return super.getResponse();
}
Global site tag (gtag.js) - Google Analytics