webwork/src/main/webwork/action ActionSupport.java,1.52,1.53
[email protected] Fri, 04 Jun 2004 00:57:26 -0700
| Newsgroups | gmane.comp.java.open-symphony.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/opensymphony/webwork/src/main/webwork/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5907/src/main/webwork/action Modified Files: ActionSupport.java Log Message: Allow basic 'AOP' style injection in webwork for method calls made via reflection. The basic usage will be to allow profiling to the code, although other usages I'm sure are possible. Fixes WW-550. Added a new class 'InjectionUtils', and a new webwork property 'webwork.injection.class', which you can implement yourself. Changed all usages of Method.invoke() to call InjectionUtils.invoke() instead. Index: ActionSupport.java =================================================================== RCS file: /cvsroot/opensymphony/webwork/src/main/webwork/action/ActionSupport.java,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- ActionSupport.java 17 Apr 2004 21:35:03 -0000 1.52 +++ ActionSupport.java 4 Jun 2004 07:57:24 -0000 1.53 @@ -17,6 +17,7 @@ import javax.servlet.ServletRequest; import webwork.util.editor.PropertyEditorException; +import webwork.util.InjectionUtils; /** * This is a useful base class for WebWork Action implementations. It gives you access to @@ -26,7 +27,7 @@ * This is useful in the case that your action cannot use subclassing to add functionality * * @see Action - * @author Rickard Oberg ([email protected]) + * @author Rickard Öberg ([email protected]) * @author Victor Salaman ([email protected]) * @version $Revision$ */ @@ -413,7 +414,7 @@ } try { - return (String) method.invoke(this, new Object[0]); + return (String) InjectionUtils.invoke(method, this, new Object[0]); } catch (InvocationTargetException e) { /** ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504