Isis
  1. Isis
  2. ISIS-210

Support parameter choices on contributed actions

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: core-1.3.0
    • Component/s: Core
    • Labels:
      None

      Description

      Currently, choices on actions parameters are picked up by looking for no-arg actions following the naming convention:

      List<T> choicesNActionName()

      However, for a contributed action the action belongs on a service, with the contributee being a parameter of the action. In order to be able to meaningfully provide choices that are specific to the contributee, we need the ChoiceFacetFactory to be able to detect:

      List<T> choicesNActionName(Contributee c)

      also.

        Activity

        Hide
        Dan Haywood added a comment -

        Extending the scope of this to incorporate a refactor, whereby contributed ObjectActions are wrappers around underlying service actions (similar to ISIS-497) This should simplify code in the viewers, and make it easier to implement this ticket.

        Show
        Dan Haywood added a comment - Extending the scope of this to incorporate a refactor, whereby contributed ObjectActions are wrappers around underlying service actions (similar to ISIS-497 ) This should simplify code in the viewers, and make it easier to implement this ticket.
        Hide
        ASF subversion and git services added a comment -

        Commit 07d99321cdcb894d26e0f1b61d78195c7f83809c in branch refs/heads/master from Dan Haywood
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=07d9932 ]

        ISIS-210: choices with param types now also supported.

        • changes to ObjectActionParameterContributee subtypes and ActionParameterChoicesFacet to support choices taking parameter types
        • refactored to simplify impl of defaults also

        in addition:

        • updated ToDo example, factored out ToDoItemContributions to demonstrate usage with a new "updateCategory" action
        • combined ToDoItemsJdo with ToDoItems service
        • new installAndReturnFirst() prototype action

        also:

        • fixed minor issue with wicket dropdown; the current value must be in the list of choices, else will NPE, so adds automatically
        • enhanced rendering of actions to show @DescribedAs as a title
        Show
        ASF subversion and git services added a comment - Commit 07d99321cdcb894d26e0f1b61d78195c7f83809c in branch refs/heads/master from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=07d9932 ] ISIS-210 : choices with param types now also supported. changes to ObjectActionParameterContributee subtypes and ActionParameterChoicesFacet to support choices taking parameter types refactored to simplify impl of defaults also in addition: updated ToDo example, factored out ToDoItemContributions to demonstrate usage with a new "updateCategory" action combined ToDoItemsJdo with ToDoItems service new installAndReturnFirst() prototype action also: fixed minor issue with wicket dropdown; the current value must be in the list of choices, else will NPE, so adds automatically enhanced rendering of actions to show @DescribedAs as a title
        Hide
        Dan Haywood added a comment -

        Implemented; also allows parameter defaults to specified on contributed actions.

        Show
        Dan Haywood added a comment - Implemented; also allows parameter defaults to specified on contributed actions.
        Hide
        ASF subversion and git services added a comment -

        Commit a9ff5e66dd115f660ca2fb2f7e4b0176a55c2116 in branch refs/heads/master from Dan Haywood
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=a9ff5e6 ]

        ISIS-210: further fix for choices with param types

        • should be using the new AdapterInvokeUtils#invokeWithDefaults(), not the original #invoke()
        Show
        ASF subversion and git services added a comment - Commit a9ff5e66dd115f660ca2fb2f7e4b0176a55c2116 in branch refs/heads/master from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=a9ff5e6 ] ISIS-210 : further fix for choices with param types should be using the new AdapterInvokeUtils#invokeWithDefaults(), not the original #invoke()

          People

          • Assignee:
            Unassigned
            Reporter:
            Dan Haywood
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development