-
1. Re: Please somebody help me: I am stuck
fabmars Aug 5, 2008 7:28 AM (in response to balteo)I'm not from the RF crew but a long-time user.
I think nobody answered because they're either on holidays or they didn't undertsand what you really aimed at. I'm in the 2nd category.
If I stick to the original question "rerender whether or not validation succeeds or fails", I can answer straight: you cannot fight against JSF lifecycle and you have too deal with it !
You could for example put the catpcha in another form than the other inputs on your page. Else, I would have gone towards the a4j:outputPanel approach too.
The Ajax Listener approach seems to me far too complicated for simply reRendering a zone of the screen.
As for myself, in my own app, I didn't use any mediaOutput for my captcha. I use jcaptcha, wrapped it in a custom servlet, and directly used its url in a <h:graphicImage> to render the images.
If you want, we can discuss about it (in French) if you write at <my username here>@gmail.com -
2. Re: Please somebody help me: I am stuck
balteo Aug 5, 2008 7:47 AM (in response to balteo)fabmars,
Thanks a lot for taking the time to reply to me!
I am going to have a go at the solutions you suggested when I get back home tonight and I'll be in touch,
Julien. -
3. Re: Please somebody help me: I am stuck
fabmars Aug 6, 2008 4:27 AM (in response to balteo)After some talking the solution was found combining 2 things:
- using either ajax'ed form inputs or a a4j:form ajaxSingle so that the method binding behind the submit button always gets called (INVOKE_APP phase) and be able to test or reset the captcha input everytime.
- putting some "random" part in the captcha url (like /captchaServlet?random=#{currentTime}) to prevent excessive browser caching.