This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
My application has 2 tabs and the user can add the details in both the tabs. But only when he clicks on "Save", which is in the first tab only, the info in both the tabs gets saved. For such scenario is it a good idea to use 2 forms of the 2 tabs and one action class ? Also does anyone has a sample program using multiple forms with one action class ?
While it's possible to have a single Action process two different ActionForms, it's not a clean solution, and I think it's better not to do it. You end up with a lot of if/else logic in your code, which can be cluttered and confusing.
If you do use the same action for the two different function, I'd suggest extending DispatchAction. This link explains more about how to do this.