webwork/src/main/webwork/view/xslt/SAXAdapter BeanWalker.java,1.2,1.3
[email protected] Fri, 04 Jun 2004 00:57:29 -0700
| Newsgroups | gmane.comp.java.open-symphony.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/opensymphony/webwork/src/main/webwork/view/xslt/SAXAdapter
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5907/src/main/webwork/view/xslt/SAXAdapter
Modified Files:
BeanWalker.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: BeanWalker.java
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/main/webwork/view/xslt/SAXAdapter/BeanWalker.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- BeanWalker.java 9 Sep 2002 21:21:21 -0000 1.2
+++ BeanWalker.java 4 Jun 2004 07:57:26 -0000 1.3
@@ -19,6 +19,8 @@
import java.util.List;
import java.util.Map;
+import webwork.util.InjectionUtils;
+
public class BeanWalker extends AbstractWalker
{
@@ -67,7 +69,7 @@
*/
try
{
- propertyValue = m.invoke(value, NULLPARAMS);
+ propertyValue = InjectionUtils.invoke(m, value, NULLPARAMS);
}
catch (Exception 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