Results 1 to 2 of 2

Thread: CommandController.setCommand ?

  1. #1
    Join Date
    Sep 2004
    Posts
    15

    Default 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
    Rgds,

    Ultan

  2. #2
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •