RE: question about ActionForm parameter of Action.execute() metho d
Kevin wrote: Can the ActionForm parameter of the Action.execute method be null? Under what circumstances will it be null and when will it be not-null? If there is no form bean associated with the action in struts-config.xml, then the ActionForm parameter will be null. Is this described anywhere? It's definitely been discussed here, did you find anything in the archives? In the struts-example source, some of the actions check the form parameter and will instantiate (and put it into scope) if it is null. Is that something that has to be done? Why doesn't Struts do the instantiation and putting into scope? You don't have to do it, Struts will instantiate the form bean and place it in scope as long as struts-config is correct. The code could be removed from struts-example and it would still work, but it's not hurting anything. I agree it's a bit confusing and have previously wished for some explanatory comments near the code. But I don't complain too loud since I have not submitted a patch. :) -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University PA Information Resources Management
RE: question about ActionForm parameter of Action.execute() metho d
--- Wendy Smoak [EMAIL PROTECTED] wrote: Kevin wrote: Can the ActionForm parameter of the Action.execute method be null? Under what circumstances will it be null and when will it be not-null? If there is no form bean associated with the action in struts-config.xml, then the ActionForm parameter will be null. And this association is done using the 'name' attribute of action to refer to a form-bean element? Thanks for your help, Kevin. __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: question about ActionForm parameter of Action.execute() metho d
Yes Sri -Original Message- From: Kevin HaleBoyes [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 1:31 PM To: Struts Users Mailing List Subject: RE: question about ActionForm parameter of Action.execute() metho d --- Wendy Smoak [EMAIL PROTECTED] wrote: Kevin wrote: Can the ActionForm parameter of the Action.execute method be null? Under what circumstances will it be null and when will it be not-null? If there is no form bean associated with the action in struts-config.xml, then the ActionForm parameter will be null. And this association is done using the 'name' attribute of action to refer to a form-bean element? Thanks for your help, Kevin. __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]