I had a similar problem recently. I have a series of actions that populate a formbean from a database, forward to a JSP for editing, and those submit to a different action for handling updates and cascaded things that must happen based on business rules.
I also want to be able to link directly to the update action in some cases where I have all the fields I want to change. For instance, say I have a user/group/access table. I can edit a particular user's priviledges by called "groupmaint.do" or with the ID of the user in question. That action (EditGroupMemAction) populates a three field bean (Member ID, Group ID, Access Level) and forwards to groupmaint.jsp -- the details get edited, then posted to updategroup.do which updates the database, etc. and forwards back to the starting page. >From the main page, I have the option for each user to "ask" for membership in any group they don't currently belong in. They can hit one button that forwards to a different action (groupinterest.do), with a forward called "returnto" set to the main page. That action calls the exact same class as updategroup.do, but that class knows to look for a forward called "returnto" and either return to it or "pass it along" by storing it as a session variable. When I do that, I store the entire ActionForward object, not just the page name, so I catch requests to redirect as well as any other strange config details of that forward. Does that help? ----- Original Message ----- From: "Jeff Smith" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, March 21, 2003 10:12 AM Subject: [Q] Return-to-page - is there a slick solution? > My user is on his favorite page (one of many report pages he can choose > from). From there, I want to offer a number of "utility" sequences that he > can run - say Edit Profile, Change Preferences, etc. Each of these sequences > may be 1 page or a sequence of 2 or 3. I want to keep track of which page he > was on when he started and then return to that page at the end of the > sequence. > > I could easily track that info in the first action step, put it into the > session scope and then pop back there at the end. But that seems to > circumvent the entire struts action forwarding mechanism. > > I could grab the Action Mapping Input field, but that presumes that I will > only invoke my sequence from one place. > > Struts appears to be missing a mechanism for these "subroutine-like" > sequences. > > Does anybody have an elegant solution to this problem? > > Jefficus > > > --------------------------------------------------------------------- > 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]

