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

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

    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

          People

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

            Dates

              Created:
              Updated:
              Resolved: