Announcement Announcement Module
Collapse
No announcement yet.
CommandController.setCommand ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • CommandController.setCommand ?

    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 ?

    TIA

  • #2
    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.

    Erwin

    Comment

    Working...
    X