Did you really mean to say don't base the ACTION on a concrete subclass? If so, I'm a bit confused (which is my usual state of being, so all is well)...
Yes. Someone is talking about writing an Action which expects in its execute(...) method to receive an ActionMapping which implements a specific interface....
public ActionForm execute(ActionMapping mapping, ActionForm form, ...) { MySpecialActionConfig msac = (MySpecialActionConfig) mapping;
}
What I'm saying is "MySpecialActionConfig" should be an interface.
As much as custom ActionMappings are handy in Struts today, I think the struts-chain model makes them even more attractive. We're using custom ActionMappings and a custom chain command to deal with authentication in an app that can't use J2EE roles-based authentication.
Hope this helps, Joe
The way I am looking at it, the only thing I'm extending is the ActionConfig, which is a class. The Action Martin wrote of course extends Action.
Did I completely miss your meaning? (Ok, let me amend that to cover the most likely scenarioa: IN WHAT *DID* I completely miss your meaning? :) )
-- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com
On Tue, September 21, 2004 3:46 pm, Joe Germuska said:(1) Extend ActionMapping and have accessors and mutators for all the "extra" attributes needed (whatever they may actually be, still open for debate)
Admitting that I haven't been following this thread closely...
please, base the Action on an interface, not a concrete subclass of ActionMapping (ActionConfig). The last thing we need is another single-inheritance trap.
Thanks Joe
BTW, I think it would be cool to have some core stuff which demonstrates the idea of using custom ActionMappings, as it's a powerful piece of functionality that I think is generally not understood by beginning Struts developers.
-- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn back; I'll know I'm in the wrong place." - Carlos Santana
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn back; I'll know I'm in the wrong place."
- Carlos Santana
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]