Don Brown wrote:


ActionContext is based on code I wrote for a POJO action framework extension for Struts a little while back. It is initialized at the start of the chain, receiving the chain Context. It then stores an instance of itself in threadlocal, to be optionally retrieved by ActionContext.getCurrentInstance(). It contains all the methods we now have in Action like saveToken(), getMessage(), etc.

This "educated" Context looks good and this is what I did a year ago, it very OO.


I now do not hang method of the Context, becuase they may not be in a "web" context.
For example, commands may, or may not need token, messages, etc.


I like plain Context, just plain Chain context.

If some commands use it in diferent context;
depending on the context of course, w/ pun.

This way I can start puting in my values that come from browser in version 1 of my app.

Then... in version 2, I put in something else, and my action code and dispatcher still works.
Imagine an XML you pass to the action, and return XML. (XML is just name/value pairs).


If there is a clever way to make the app work in both cases. I think if action takes a VO (w/ no real methods).
Same action could service 2 diferent contexts (without instanceOf, yuck)


.V


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to