RE: Code reduction for Action classes

2006-10-11 Thread Givler, Eric
IL PROTECTED] Sent: Wednesday, October 11, 2006 3:44 PM To: Struts Users Mailing List Subject: Re: Code reduction for Action classes 1)rewrite your save() logic to invoke form.getAction() and test on the returned parameter if(form.getAction() == "save") { //do all your save logic he

Re: Code reduction for Action classes

2006-10-11 Thread Martin Gainty
1)rewrite your save() logic to invoke form.getAction() and test on the returned parameter if(form.getAction() == "save") { //do all your save logic here return (mapping.findForward("save")); } //the last thing you need to do in your save method is to return the mapping for success as in return

Re: Code reduction for Action classes

2006-10-11 Thread Martin Gainty
Eric Take a look at the bottom save method HTH Martin -- > I've been trying to get the hang of struts now for the past few months, and > am wondering how people write "re-usable" base classes for Struts. If you > have the time, I'd really appreciate your thoughts on this - bear with me, as >