Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-2152

FactoryService (API): remove 'm' shortcut, add 'viewModel'

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-M3
    • None
    • None

    Description

      Opinionated: remove this shortcut for 'mixin', don't encourage bad code readablity, especially when the verbose variant 'mixin' is already short enough:

       

      <T> T m(Class<T> mixinClass, Object mixedIn);
      

      Add

       

       

      /**
       * Creates a new ViewModel instance, and initializes according to the given {@code mementoStr}
       * @param viewModelClass
       * @param mementoStr
       * @since 2.0
       */
      <T> T viewModel(Class<T> viewModelClass, @Nullable String mementoStr);
      

      However, I'm not entirely sure whether its a good idea to expose the mementoStr with the API that way.

       

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            hobrom Andi Huber
            hobrom Andi Huber
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment