My thought process was that if you're editing an existing record, you want to visually see the change after you've made it. When adding a new record, it's likely you don't want to see the change. That was my thinking when I did it this way.
Matt On Tue, Sep 9, 2008 at 9:52 AM, Rob Hills <[EMAIL PROTECTED]> wrote: > > Hi All, > > I note from the tutorials that in an Action class, the save method normally > returns SUCCESS if a new record is being added and INPUT if an existing > record is being saved. > > Why is it done this way? > > A side effect of this and the usual navigation setup in struts.xml is that > saving a new record returns the user to the list screen whereas saving edits > to an existing record returns the user to the edit screen. > > In my use case, I want to return the user to the List screen when saving a > record whether they are adding a new record or editing an existing one. > AFAICT, I can do that simply by returning SUCCESS in either case. However, > would there be other adverse effects from this approach? > > Cheers, > > Rob Hills > Waikiki, Western Australia > -- > View this message in context: > http://www.nabble.com/AppFuse-2-%2B-Struts-2---Why-does-save-action-return-INPUT-for-an-existing-record--tp19395366s2369p19395366.html > Sent from the AppFuse - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
