You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/08/07 21:08:10 UTC

DO NOT REPLY [Bug 22228] New: - The Action.saveErrors() method won't save an empty ActionErrors object

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22228>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22228

The Action.saveErrors() method won't save an empty ActionErrors object

           Summary: The Action.saveErrors() method won't save an empty
                    ActionErrors object
           Product: Struts
           Version: 1.1 RC1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Standard Actions
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: rmann@latencyzero.com


Which makes things a bit inconvenient. Imagine this scenario: You create an ActionErrors object in 
your action, but as the action progresses you want to add ActionError objects to it if an error 
condition occurs. Once an error occurs, you might return a forward to your error page. Since you 
can't call saveErrors() until you've added at least one error to ActionErrors, you have to saveErrors() 
at each point (not knowing in advance which one will execute.

Since the rendering tags are smart enough to deal with an empty ActionErrors object, why not 
avoid the test for emptiness in saveErrors()?

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org