I've just checked in the command code to xwork. It allows you to do this: <action name="commandTest" class="com.opensymphony.xwork.SimpleAction"> <param name="foo">123</param> <result name="error" type="chain"> <param name="actionName">bar</param> </result> <interceptor-ref name="static-params"/> <command name="myCommand" method="commandMethod"> <param name="bar">456</param> <result name="success" type="chain"> <param name="actionName">foo</param> </result> <interceptor-ref name="logger"/> </command> </action>
The command here creates a new alias in the runtime configuration and inherits properties from the enclosing action. It will also call the supplied method. Actions are not required to supply a method, although they can as well. If no method is supplied for an Action, it defaults to calling action.execute(). For now Actions must still implement this interface, although this can easily be removed and the object can be cast to Action before calling execute(). This should be the last major change to configuration. The only other thing I want to do, and I just thought of this while I was writing this, is to make name optional on the Action and have it not create a runtime ActionConfig for the action itself if there is no name, although you could have several commands underneath the action which would be configured. I also refactored the names of the config classes. Configuration -> ConfigurationProvider ConfigurationFactory -> ConfigurationProviderFactory DefaultConfiguration -> DefaultConfigurationProvider SimpleConfiguration -> SimpleConfigurationProvider I've also created 2 new classes in the ActionConfig class hierarchy to support commands: ActionCommand ^ | ActionConfig ^ | HierarchicalActionConfig ActionCommand has: methodName Interceptors Parameters Results resultParameters ActionConfig adds: Class clazz TypeConverter HierarchicalActionConfig adds: Commands ActionConfig is the runtime datastructure, the other 2 are used on the programmatic side. Ok, so go ahead and start making fun of my class naming, but you'd better have some better ideas :-) Jason -- Jason Carreira Technical Architect, Notiva Corp. phone: 585.240.2793 fax: 585.272.8118 email: [EMAIL PROTECTED] --- Notiva - optimizing trade relationships (tm) ------------------------------------------------------- This SF.net email is sponsored by: Scholarships for Techies! Can't afford IT training? All 2003 ictp students receive scholarships. Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. www.ictp.com/training/sourceforge.asp _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork