struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bullard, James" <JBull...@AR.SONY.COM>
Subject saveErrors and saveMessages implementation question.
Date Tue, 08 Jun 2004 19:55:23 GMT
Hello, I am using the template design pattern (abstract superclass which
extends action and declares a myExecute method which will be called in the
execute method of the Abstract class)

In the superclass I have a local variable errors which in the finally clause
will be saved, irrespective of what happened in the call to myExecute. The
problem is that saveErrors will delete the key Globals.ERROR_KEY in the
request if you pass in null, without checking whether other errors have been

It is a simple workaround:

if (!errors.isEmpty()) {
   saveErrors(request, errors); 

However, the case where both record errors is not so simple, or it is
certainly not as clean as just calling saveErrors and having the new errors
added to the end of the errors which are currently in the request. 

Is this the desired implementation if so I am not clear as to why. Thanks
much .. 


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message