-
1. Re: Component Message Problem
gavin.king Jun 3, 2006 11:31 AM (in response to brianleonard)Change the id from "userName" to "username".
Actually this is a bug, that I will fix. -
2. Re: Component Message Problem
gavin.king Jun 3, 2006 7:12 PM (in response to brianleonard)oh, hold on, it looks like you are using an olde version of the registration example. This problem does not occur if you use s:vaidate or s:validateAll instead of @IfInvalid.
-
3. Re: Component Message Problem
brianleonard Jun 4, 2006 9:06 PM (in response to brianleonard)Well, if you consider 1.0.0CR3 old, then yes. I just downloaded the cvs head, and it doesn't appear that the @NotNull constraint is being caught by the s:validateAll tag as I'm getting the following exception:
javax.faces.FacesException: Error calling action method of component with id _id0:_id6 at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74) ... Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{register.register} at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153) ... ... ... Caused by: org.hibernate.validator.InvalidStateException: validation failed for: org.jboss.seam.example.registration.User at org.hibernate.validator.event.ValidateEventListener.validate(ValidateEventListener.java:104)
This is running the unmodified version of the Registration example that ships with the source. I guess as a work around for now, I can set the required property to true on the component.
Regards,
Brian -
4. Re: Component Message Problem
gavin.king Jun 4, 2006 9:28 PM (in response to brianleonard)Ooops, I forgot the required="true" on the input fields.
You need this, a JSF validator (somewhat bizarrely) cannot be used to validate null-ness. -
5. Re: Component Message Problem
kevin.simons Jun 20, 2006 3:56 AM (in response to brianleonard)I've got the updated registration example (with required="true" on the input fields) and I'm still getting the exception described by Brian:
javax.faces.FacesException: Error calling action method of component with id _id0:_id9 at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74) ... Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{register.register} at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153) at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63) ... Caused by: javax.ejb.EJBException: java.lang.RuntimeException: java.lang.NoSuchMethodError: javax.interceptor.InvocationContext.getTarget()Ljava/lang/Object; at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69) ... Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodError: javax.interceptor.InvocationContext.getTarget()Ljava/lang/Object; at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:128) ... Caused by: java.lang.NoSuchMethodError: javax.interceptor.InvocationContext.getTarget()Ljava/lang/Object; at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:37) ...
I'm using a brand new download of JBoss 4.0.4 GA and I just download SEAM yesterday (June 19). -
6. Re: Component Message Problem
gavin.king Jun 20, 2006 6:24 AM (in response to brianleonard)You need EJB 3.0 RC8.
Or install JBoss with the "JEMS Installer".
This is doc'd in the getting started guide and in the announcements above.