DO NOT REPLY [Bug 34857] - addMessages/getMessages for session scope
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34857. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34857 --- Additional Comments From [EMAIL PROTECTED] 2006-12-06 12:19 --- I was also forced to add these into an Action subclass. Messages are one of those Struts features that is a frequent cause of silent breakage in my projects, because it's rare that every developer on the team understands the subtle repercussions of changing a forward to redirect, or forwarding to another action (which calls saveMessages() again and wipes out existing messages, etc.). And of course there's no error message when these things go awry, to alert them to the malfunction or give them a headstart debugging, if they even notice there's problem. I googled up this bug because it seemed like a no-brainer to add these methods, and I was trying to find which version of Struts added them. My team is using the standard POST-redirect-GET model for actions that change the database, as the cleanest solution to avoiding unintentional resubmits (but still allowing *intentional* resubmits -- the token system fouls that up). Messages are again difficult to manage correctly. The newish saveMessages() that takes the Session seemed like a great solution -- I don't want to load up the session, but the redirect option on a forward is basically useless without it. But then we noticed that when the change action redirected to the view action, messages disappeared. A peek at the source of saveMessages() answered the question, and addMessages() seemed like the solution -- but without the session support, that's just as useless. Personally, I don't understand why the *default* behavior of saveMessages() is to discard all existing messages. When would that be desirable? -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 34857] - addMessages/getMessages for session scope
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34857. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34857 --- Additional Comments From [EMAIL PROTECTED] 2006-12-06 13:52 --- This instance of Bugzilla is closed. You would want to post the comment here: * https://issues.apache.org/struts/browse/STR-2463 -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 34857] - addMessages/getMessages for session scope
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34857. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34857 [EMAIL PROTECTED] changed: What|Removed |Added Component|Controller |Action -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 34857] - addMessages/getMessages for session scope
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34857. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34857 --- Additional Comments From [EMAIL PROTECTED] 2005-05-12 07:49 --- The way Struts works in normal operation is to deal with errors or messages stored in request scope - hence the provision of convenience methods that facilitate that process. The reason save methods were added for session scope was specifically for the situation where someone wants to re-direct and not lose the errors or messages. IMO the methods provided are adequate for these requirements and the additional convenience methods you're requesting just adds clutter making it more confusing for people to understand which they should use. I think we should close this as WONTFIX, but I'll leave it open in case anyone else disagrees or you want to make the case for why they should be included. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]