[seam-issues] [JBoss JIRA] (JBSEAM-4940) @CaptchaResponse throws javax.validation exception

Andrea Martino (JIRA) jira-events at lists.jboss.org
Wed Apr 25 15:30:17 EDT 2012


Andrea Martino created JBSEAM-4940:
--------------------------------------

             Summary: @CaptchaResponse throws javax.validation exception
                 Key: JBSEAM-4940
                 URL: https://issues.jboss.org/browse/JBSEAM-4940
             Project: Seam 2
          Issue Type: Bug
          Components: Core, Framework
    Affects Versions: 2.3.0.BETA1
         Environment: JBOSS 7.1 AS + JSF2 + RichFaces 4.2
            Reporter: Andrea Martino


When the JSF login page sets the captcha value in the "org.jboss.seam.captcha.captcha" component, a "contains Constraint annotation, but does not contain a groups parameter" exception is thrown.

Create a new customized "captcha" as following:

{code:title=MyCaptcha.java|borderStyle=solid}
@Name("myCaptcha")
public class MyCaptcha extends org.jboss.seam.captcha.Captcha {

    private String myResponse;

    @org.jboss.seam.captcha.CaptchaResponse
    public String getMyResponse{
       return myResponse;
    }

    public void setMyResponse(String myResponse) {
       this.myResponse = myResponse;
    }
}
{code}

Just create a JSF page and set the "myResponse" field annotated with "CaptchaResponse" in the above component:

{code:xml}
<h:form>
    <h:inputText value="#{myCaptcha.myResponse}" size="5"/>
    <h:commandButton action="#{myLogin.login}" value="Login" />
</h:form>
{code}

The above code works in Seam 2.2.x, but throws a javax.validation exception complaining about missing "group" in Seam 2.3.0.Beta1 ("contains Constraint annotation, but does not contain a groups parameter").

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list