Nov 5th, 2004, 11:38 AM
Is there anyway of setting the instance of command class created in the AbstractCommandController/BaseCommandController to be the result of the getObject call from a FactoryBean ?
Rather than pass in the name of a class as the command object I want to be able to pass in a bean reference, and that would be a ref to a MapFactoryBean that I can configure (rather than code a new bean) with a variety of elements ?
Nov 5th, 2004, 12:36 PM
I guess one way of doing this is subclass the AbstractCommandController or BaseCommandController and add a setter for your bean. You can then configure the command used by the controller with a normal bean ref in the application context XML. Also redefine the createCommand() method of BaseCommandController to just return your bean.