3 Replies Latest reply on Aug 6, 2008 4:27 AM by fabmars

    Please somebody help me: I am stuck

    balteo

      Hello,
      I have been stuck for over a week with ajax issues and would be extremely grateful for some help. I am not sure I found a bug in richfaces or if I am completely missing the point. Here are my two threads:
      http://jboss.com/index.html?module=bb&op=viewtopic&t=140246
      http://jboss.com/index.html?module=bb&op=viewtopic&t=140231
      Can anyone help?
      Thanks,
      Julien.

        • 1. Re: Please somebody help me: I am stuck
          fabmars

          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

            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

              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.