I have the following code snippet inside h:form
<h:panelGrid id="captchaGrid">
<p:captcha id="captcha" label="Captcha" required="true"
requiredMessage="required"
validatorMessage="...">
</p:captcha>
<p:message id="captchaMessage" for="captcha" />
</h:panelGrid>
<p:commandButton id="submitButton" value="save"
actionListener="#{userBean.save}" update="captchaGrid"
onstart="doSomething()"
oncomplete="doSomethingElse(xhr, status, args)" icon="ui-icon-check">
</p:commandButton>
This works fine if I enter the code correctly. However, if I enter an invalid value, the captcha component will simply disappear.
I tried to remove the attribute update="captchaGrid". This time the captcha has not disappeared. Instead, it was not updated visually, but (I think) internally. Since the correct completion of two words still raises a validation error.
Further; I do not want to use ajax="false".
Update: I also tried oncomplete="Recaptcha.reload()". Does not work. There is a mistake. But I do not know if it was my code or Primefaces 3.0 :)
2: maple_shaft, , Primefaces/Recaptcha. , .
.