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.
P.S. Just so you know, in the case of a cancel button, The Action class has an isCancelled method that accomplishes the same thing as your code above. [ October 05, 2006: Message edited by: Merrill Higginson ]
I did this without the usage of DispatchAction. I wonder what is the value of DispatchAction and would that eliminate the bean? if so, how would the Action look like (I must get the property somehow?!)
thank you Merrill!
Joined: Feb 15, 2005
DispatchAction would not eliminate the need for an ActionForm bean. It is used if you want to avoid a long if/else structure in your program. It allows you to create individual methods for each of the buttons that are automatically called by DispatchAction.
This link gives a good explanation of what DispatchAction does and how to use it. [ October 06, 2006: Message edited by: Merrill Higginson ]