Results 1 to 5 of 5

Thread: ActionCommand vs AbstractActionCommandExecutor

  1. #1
    Join Date
    Aug 2004
    Location
    Northridge, CA
    Posts
    151

    Default ActionCommand vs AbstractActionCommandExecutor

    Can some breifly explain the purpose ActionCommand, AbstractActionCommandExecutor. As they both seem to serve same purpose and are causing little confusion. Aslo in sample app both are used and I just wanted to make sure I understand them.


    Thanks

    Amad

  2. #2
    Join Date
    Sep 2004
    Location
    Ghent, Belgium
    Posts
    224

    Default

    The ActionCommand is used to implement "local" commands, these are commands that only have a meaning to one view. (in the sample app: the rename command in the OwnerManagerView)

    The AbstractActionCommandExecutor is used to implement "global" commands (commands that are application wide). (in the sample app: the properties and delete command in the OwnerManagerView)

    See http://opensource.atlassian.com/conf...-GlobalActions for more info on abstract commands.

    Hope this helps,

    Peter

  3. #3
    Join Date
    Sep 2004
    Location
    Ghent, Belgium
    Posts
    224

    Default

    Typo:

    See http://opensource.atlassian.com/conf...-GlobalActions for more info on abstract commands.
    I didn't mean abstract commands but global commands[/quote]

  4. #4
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    Right on, Peter. You can also choose to implement ActionCommandExecutor in the cases where extending ActionCommand is just not an option. For example, the NewOwnerWizard does this, to encapsulate logic for opening up the NewOwnerWizard dialog.

    With this approach, you use composition with a TargetableActionCommand instance, setting the executor for the targetable action command (even if the command itself isn't retargeted after startup)
    Keith Donald
    Core Spring Development Team

  5. #5
    Join Date
    Sep 2004
    Location
    Ghent, Belgium
    Posts
    224

    Default

    I updated the user documentation to reflect Keith's answer.

Posting Permissions

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