[jboss-user] [JBoss Seam] - Shouldn't captcha.validate also clear response?
henrik.lindberg
do-not-reply at jboss.com
Wed Aug 1 14:11:42 EDT 2007
In Captcha.java, in this method:
| public boolean validateResponse(String response)
| {
| boolean valid = CaptchaImage.instance().validateResponse(id, response);
| if (!valid)
| {
| init();
| }
| return valid;
| }
|
it calls init() to generate a new image (which is good), but it does not reset the response value. End result is that user gets a new image, but the old (invalid) text that was entered. So the first thing the user has to do is clear the field. Getting the old response again is useless for the user.
Think it should do:
| if(!valid)
| {
| this.response = "";
| init();
| }
|
or do you have some other suggestion how to get the response cleared when it is invalid.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069762#4069762
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069762
More information about the jboss-user
mailing list