A summary of the changes (read below for more):
* Removed ActionContext ThreadLocal in favor of a simple context Map
* Modified View, Action, and InterceptorChain interfaces/objects to have
access to the context Map
* Removed ActionFactory entirely in favor of interceptors
* Removed GenericDispatcher in favor of a much simpler Dispatcher class
* Removed original ValueStack in favor of an OgnlValueStack
-------------------
OK, I've updated the CVS stuff. The major thing here is that I got rid of
ThreadLocals. Instead of a GenericDispatcher there is a Dispatcher object
that can either re-use an existing context or create a new context. To run
an action, you do:
HashMap context = new HashMap();
context.put("xwork.action.name", "Foo");
new OgnlValueStack(context);
Dispatcher d = new Dispatcher(context);
d.executeAction();
That's it! I'll digest the lines one at a time:
1) Creates the context map
2) sets the action name
3) creates a value stack using Ognl and associates it with the context
4) instantiates a Dispacher based on this context
5) executes the action, including all interceptors
The code above can actually be the follow, but I wanted to go over what was
happening first:
Dispatcher d = new Dispatcher("Foo");
d.executeAction();
Basically, the other constructor of Dispatcher will set up the context
accordingly. I've modifed Jason's interceptor code (which RULES by the way,
I've already removed the ActionFactory entirely and created a
ParametersInterceptor as well as ChainingInterceptor), such that the
InterceptorChain object holds on to a reference of the context map and can
give be accessed by the interceptors. Likewise, the View inteface now takes
the context map as well. And lastly, so does the Action interface. They all
take a single argument, Map context.
Of course, all these changes I've made mean compatability is MUCH harder
now. On the other hand, I think we're also MUCH closer to a kick ass
framework. Let's not worry about compatability, right now I just want to
keep going back and forth with various designs. Jason and I have started it,
hopefully Rickard and others can also join in as well.
-Pat
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork