I have written a jsf2 (cdi) web-application, using jQuery, a syntaxhighlighting script lib. On one page I’m using the primefaces 3.2 p:captcha component.
here is the snippet, where using the captcha component.
<p> <p:captcha id="commentCaptcha" theme="white" required="true" requiredMessage="Bitte geben Sie die angezeigten Zeichen im Captcha Dialog ein." validatorMessage="Die Captcha Prüfung ist fehlgeschlagen. Bitte versuchen Sie es erneut." secure="true" language="de"/> </p> <p> <h:commandButton action="#{commentCreatorBean.createCommentForArticle(newComment, article)}" value="Eintragen"> <f:ajax execute="commentCaptcha name mail comment" render=":commentsGroup @form :commentMessages"/> </h:commandButton> <div id="hint">...</div> </p>
- If the given input in the captcha dialog is correct, then everything work’s fine and in this case a comment is persisted.
- Is the given input empty, than the requiredMessage is shown in the h:messages area and a pop-up show’s an error msg (see the error msg’s below)
- Is the given input wrong, than the validatorMessage is shown in the h:messages area and also a pop-up show’s an error msg (see the error msg’s below)
If using the chromium browser, I’ve got the error message: malformedXML: NETWORK_ERR: XMLHttpRequest Exception 101
If using the firefox browser, I’ve got: malformedXML: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)
Does anybody know, what the problem is? I’m registered at google’s recaptcha page with my domain. The public and private key are set in the web.xml ( followed the instruction’s of primefaces docu )
Thank’s in advance!
It looks like you are trying to submit the Primefaces Captcha via AJAX.
This won’t work.
The Primefaces Captcha is an extension of the Recaptcha plugin and it currently does not support AJAX functionality.