This content has been marked as final.
Show 3 replies
-
1. Re: Captcha and Ajax forms
ilya_shaikovsky Jan 21, 2009 9:13 AM (in response to demetrio812)what did you mean by not working? action method not fired?
second - yes you should clear the value yourself because old one will be shown anyway if value stored or if validation failed. and this is standard behavior. jsf inputs shows last value from submittedValue if validation fails. -
2. Re: Captcha and Ajax forms
alex.kolonitsky Jan 22, 2009 9:31 AM (in response to demetrio812)I've tried to reproduce it on the jboss-4.2.3.GA and haven't got any problem: the captcha worked fine with ajax request.
If you wish, I can send test-application to you. -
3. Re: Captcha and Ajax forms
demetrio812 Jan 24, 2009 7:48 AM (in response to demetrio812)Hi!
Thanks for the answers and sorry for my late one...
It is working now I didn't know I had to clean it manually...
I noticed that just setting the response was not enough so looking at the surce code I've found the you also have to call the init() method, so to clean the seam captcha the code is:@In Captcha captcha; .... captcha.setResponse(null); captcha.init();
You can also call validateResponse with a wrong value so it will call init but it's better to directly call init I think.
Also I think that instead of inject the captcha instance you can get using Captcha.instance().
Am I missing something?
Thanks again
Demetrio