Hi,

I have one DispatchAction type action [/Person.do] with the following methods "list","populate" and "update":
1) Code inside "list" method populates the list of all users, sets this list inside request and redirects this request on [PersonList.jsp] page which makes persons presentation. Each person entry (row) on this page has a link for entry editing pointing to PersonAction with "method=populate" and "personID" as a second attribute (e.g. /Person.do?method=populate&userID=100).
2) Code inside "populate" method retrieves the data from DB, populates [PersonForm] and presents [PersonEdit.jsp] page with existing data for that person. Data from this form are submitted to (again) Person action with "method=update".
3) Code inside "update" takes new data from PersonForm and updates underlying DB. After update, I need forwarding/redirecting data back to Person action with method=list.


How to make redirection to this Person with method=list?

I can do it by returning complete new ActionForward object - return new ActionForward("/Person.do?method=list") - but this is hard coded mapping link - not in spirit of STRUTS. I'd like to take forwarding address from mapping object having the ability to manage action flow from central config file! If I set reqest.setAttribute("method","list") and make forward with mapping.getForward("Person") - it does not work!

Stjepan Brbot

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to