I understand what you are trying to accomplish, but not sure on what the problem is?
I don't necessarily need code, but are you using DispathAction? If not, just a standard action
servlet? Are you using DynaForms or form classes?
Typically in the scenario you descibe, you have a single form and the ID is null or blank in your first process, then, when passed back to the same JSP, the ID now has a value and is posted during the second process you describe.
Your action method would need to check the value of ID to see if you need to perform the first or second action, based on whether the ID is null or not.
I personally would recommend using DispatchAction instead and based on which option is clicked, call the appropriate method, rather than have a single method doing both processes.