Sorry about this. It was necessary to allow multiple messages per field,
especially when I added the VisitorFieldValidator to call validations on
sub-objects. 

I'm not sure why Mike put doDefault() in ActionSupport... It's going to
go away when I refactor out the workflow from ActionSupport and merge
BaseActionSupport back into ActionSupport. 

Validations can be applied to any method executed on your Action by
applying the ValidationInterceptor to it.. After I refactor it and
create the Validateable Interface (probably tomorrow), if your Action
implements Validatreable (as ActionSupport will) you can put validations
in the validate() method to add errors to the Action. Then, if the
Action has no errors, it will execute the Action.

> -----Original Message-----
> From: Armond Avanes [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 29, 2003 12:58 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [OS-webwork] Multiple problems
> 
> 
> Hi Mathias,
> 
> The same problem with error messages here while I
> tried to upgrade to the latest on CVS.
> Even the worse is that all my test units are getting
> failed because of this small change (since they're
> strickly checking the returned error messages).
> 
> Anyone any clue ?
> 
> Btw, I have another question too. Is it correct to do
> the validation on "doDefault()"? 
> Although my whole action package is using
> ValidationStack but I don't expect any validations at
> least on "doDefault()". Otherwise the whole concept of
> this method can be questioned (usually you want your
> form to be up -for the first time- without any
> validation by calling this method)!
> 
> Any help is greatly appreciated...
> 
> Cheers,
> Armond
> 
> --- BOGAERT Mathias <[EMAIL PROTECTED]> wrote:
> > Hi guys,
> > 
> > I tried upgrading my project to the latest
> > xwork/webwork2 sources, and I
> > have some problems:
> > 
> > - all error messages (action errors) are now
> > surrounded with [ and ]
> > - a select with <option></option> (using
> > emptyOption="true") throws an OGNL
> > exception:
> > 
> > 20078 INFO  [tcpConnection-81-1]
> > (xwork.interceptor.LoggingInterceptor:44) -
> > Finishing execution stack for action create
> > 21406 INFO  [tcpConnection-81-1]
> > (xwork.interceptor.LoggingInterceptor:48) -
> > Starting execution stack for action createstep1-save
> > java.lang.NumberFormatException: For input string:
> > ""
> >     at
> >
> java.lang.NumberFormatException.forInputString(NumberFormatExc
> eption.java:48
> > )
> >     at java.lang.Long.parseLong(Long.java:415)
> >     at java.lang.Long.parseLong(Long.java:452)
> >     at ognl.OgnlOps.longValue(OgnlOps.java:87)
> >     at ognl.OgnlOps.convertValue(OgnlOps.java:195)
> >     at
> >
> ognl.DefaultTypeConverter.convertValue(DefaultTypeConverter.java:50)
> >     at
> >
> com.opensymphony.xwork.XWorkBasicConverter.convertValue(XWorkB
> asicConverter.
> > java:79)
> >     at
> >
> com.opensymphony.xwork.util.XWorkConverter.convertValue(XWorkC
> onverter.java:
> > 123)
> >     at
> >
> ognl.OgnlRuntime.getConvertedType(OgnlRuntime.java:428)
> >     at
> >
> ognl.OgnlRuntime.getConvertedTypes(OgnlRuntime.java:447)
> >     at
> >
> ognl.OgnlRuntime.getConvertedMethodAndArgs(OgnlRuntime.java:473)
> >     at
> >
> ognl.OgnlRuntime.getAppropriateMethod(OgnlRuntime.java:523)
> >     at
> >
> ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:535)
> >     at
> >
> ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:684)
> >     at
> >
> ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectProperty
> Accessor.java:
> > 76)
> >     at
> >
> ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor
> .java:132)
> >     at
> > ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1235)
> >     at
> > ognl.ASTProperty.setValueBody(ASTProperty.java:117)
> >     at ognl.SimpleNode.setValue(SimpleNode.java:153)
> >     at ognl.Ognl.setValue(Ognl.java:478)
> >     at
> >
> com.opensymphony.xwork.util.OgnlUtil.setProperties(OgnlUtil.java:61)
> >     at
> >
> com.opensymphony.xwork.interceptor.ParametersInterceptor.befor
> e(ParametersIn
> > terceptor.java:37)
> >     at
> >
> com.opensymphony.xwork.interceptor.AroundInterceptor.intercept
> (AroundInterce
> > ptor.java:36)
> >     at
> >
> com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultA
> ctionInvocatio
> > n.java:149)
> >     at
> >
> com.opensymphony.xwork.interceptor.AroundInterceptor.intercept
> (AroundInterce
> > ptor.java:37)
> >     at
> >
> com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultA
> ctionInvocatio
> > n.java:149)
> >     at
> >
> com.opensymphony.xwork.interceptor.AroundInterceptor.intercept
> (AroundInterce
> > ptor.java:37)
> > 
> > I'm trying to solve these issues, but any
> > pointers/help would be
> > appreciated!
> > Overall the latest CVS version seem faster.
> > 
> > Cheers,
> > Mathias
> > 
> > 
> >
> -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf 
> > _______________________________________________
> > Opensymphony-webwork mailing list 
> > [EMAIL PROTECTED]
> >
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf 
> _______________________________________________
> Opensymphony-webwork mailing list 
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to