webwork/src/main/webwork/view/xslt XMLResultAdapter.java,1.2,1.3
[email protected] Fri, 04 Jun 2004 00:57:28 -0700
| Newsgroups | gmane.comp.java.open-symphony.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/opensymphony/webwork/src/main/webwork/view/xslt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5907/src/main/webwork/view/xslt
Modified Files:
XMLResultAdapter.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: XMLResultAdapter.java
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/main/webwork/view/xslt/XMLResultAdapter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- XMLResultAdapter.java 9 Sep 2002 21:21:21 -0000 1.2
+++ XMLResultAdapter.java 4 Jun 2004 07:57:26 -0000 1.3
@@ -6,6 +6,7 @@
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import webwork.util.ValueStack;
+import webwork.util.InjectionUtils;
import java.beans.IntrospectionException;
import java.beans.Introspector;
@@ -84,7 +85,7 @@
// Test if property is readeable (yes, there are write-only props, sometimes)
if (readMethod != null)
{
- Object value = readMethod.invoke(object, null);
+ Object value = InjectionUtils.invoke(readMethod, object, null);
while (value instanceof ValueStack.ValueHolder)
{
value = ((ValueStack.ValueHolder) value).getValue();
-------------------------------------------------------
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