this way, the action that accesses the actionform will always have the values submitted by the browser, no more, no less - instead of possibly having "stale" data. the subclassing is done because ActionForm is being extended by each of your classes, and ActionForm doesn't have javabean methods for all the parameters in your form - your ActionForm class has those.
Sonam Belbase wrote:
I'm trying to understand ActionForms a bit better and here is my question:
If the servlet controller automatically invokes the reset() method before passing the ActionForm bean to the Action implementation class instance, how can you use the form's properties' values in your action?
Is this why in the action, you need to downcast the form argument passed by the controller servlet to your Actionform as such:
String userName = ((LoginForm) form).getUserName();
Thanks, SB
-- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]