Howdy Jolly Ranchers:
Here's my problem:
I have a page with a list of items. You can select an item for various operations (view, edit delete). When the user selects an item and then presses a button (invoking the desired operation) the Action object stores an object corresponding to the selected item as a request attribute. On a delete I display a confirmation
jsp. This jsp retrieves the request attribute and displays identifying info for the item. If the user confirms the deletion I want the next Action to perform the deletion. But since this is a new request the request attribute is no longer available - so how can I inform the Action which item to delete. I can think of 2 ways to accomplish this:
1) Use a session attribute instead of a request attribute. This doesn't seem right to me because I only want the job selection to exist for the current operaton.
2) Use a hidden field to store the item id. This seems hoky to me.
I would appreciate any feedback on this - is my understanding of the mechanics faulty? Any opinions on best practices for this kind of thing?
Thanks!
Mars