While driving back and forth for the holidays, I spent some time thinking about Struts and the new chain framework. Here are a few thoughts I had:

* ChainAction should be obsoleted before a 1.3.0 release in favor of direct handling in the default chain. As was mentioned on the user list, we could easily add "command" and "catalog" properties to ActionConfig and then add another link in the processing chain which operated if those values were present, simply by looking up and executing the specified command. As with the current action and forward handling commands, it would simply do nothing if it saw an ActionConfig which didn't have those values defined. This is something I can do this week.

* It would also be pretty easy to tack on command/catalog parameters to a ForwardConfig object and set up a similar preprocessing mechanism. It might also be nice to have a way to specify a form (and scope) so that an "output form" could be put into the context for database prepopulation. (ForwardConfig *could* extend ActionConfig and get all these things, but formally, that's probably not really right.)

This is slightly more cumbersome because the ForwardConfig never gets out into the wild, so we'd have to copy these properties to an ActionForward before it is returned by "mapping.findForward(...)". It crossed my mind that perhaps that should be the step when the form config is resolved into an object, and the ActionForward would have a form property instead of formName and formScope properties, but then I thought maybe we should just leave that up to the command we're envisioning which would create a ViewContext object.

I'd like to get some other ideas and opinions before I implement any of this.

* Now that we're moving around all these catalog/command pairs, I'm starting to wonder if we wouldn't like to have a standard representation of the pair in a single string. This may even belong in the chain-package proper, but it seems so fundamental that it would be very useful. I'm thinking split a command on ":" and if there is text preceding the colon, treat that as a catalog name. We could discuss whether we want to continue to truck around with double parameters where we have them now (the controller config) or will soon (ActionConfig, maybe ForwardConfig.) These parameters are also some place where we might like to use the wildcard substitution values, which is something I'll have to look at more closely, as I haven't really started using that yet.

There were probably some other things, but since I was doing the driving, I wasn't taking many notes.

Joe

(Apologies in advance for any duplicates; I think an earlier draft of this got caught in the moderation queue. Have to figure out what the mail server doesn't like about my primary account...)

--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

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



Reply via email to