Announcement Announcement Module
Collapse
No announcement yet.
ActionCommand vs AbstractActionCommandExecutor Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      Typo:

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

      Comment


      • #4
        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)

        Comment


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

          Comment

          Working...
          X