Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-11062

Do POC on changing lifecycle to use reflection


    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 2.4
    • Security Level: Public (Public: Anyone can view)
    • Labels:
    • Epic Link:
    • Rice Module:
    • Sprint:
      2.4.0-m3 KRAD UXI Sprint 2, 2.4.0-m3 KRAD UXI Sprint 3
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:


      In order to facilitate running a branch of the view tree during component refresh, try changing the lifecycle to use reflection for finding child components.

      Currently after the lifecycle phase is processed for a component, a call is made to getComponentsForLifecycle. The phase is then executed on each returned component, and so on. Instead of calling this method, inspect the properties for component types, and then invoke the phase on each found component property. This will allow us to build up a property path from the view to a particular component, and on the refresh we can recreate the parents for the refresh component and execute a refresh method on each to set the necessary state on the refreshed component.

      Couple things to keep in mind. We will probably need a NoLifecycle annotation (or something similar) that can be added to a property. Also, there will be no control over the order child components are processed. Not sure if that will be an issue or not.

      At least in one place I know about, there is logic in the getComponentsForLifecycle method. This is in the view component. Take a look through current implementation of getComponentsForLifecycle to see if there is anything else that might cause problems.



          mwfyffe Mark Fyffe (Inactive) logged work - 04/Nov/13 8:39 AM
          • Time Spent:
            4 hours
            Analysis of existing getComponentsForLifecycle methods, and usage patterns.
          mwfyffe Mark Fyffe (Inactive) logged work - 05/Nov/13 8:49 AM
          • Time Spent:
            2 hours
            Initial POC and unit test.
          mwfyffe Mark Fyffe (Inactive) logged work - 11/Nov/13 8:39 AM
          • Time Spent:
            6 hours
            Converted lifecycle to use reflection algorithm, worked through unit test scenarios.
          mwfyffe Mark Fyffe (Inactive) logged work - 13/Nov/13 7:50 AM
          • Time Spent:
            1 hour
            Regression testing with KRAD sample app: lookups and maintenance views.
          mwfyffe Mark Fyffe (Inactive) logged work - 18/Nov/13 9:41 AM
          • Time Spent:
            2 hours
            Conversion to unified annotation @ViewLifecycleRestriction.
          mwfyffe Mark Fyffe (Inactive) logged work - 24/Nov/13 5:49 PM - edited
          • Time Spent:
            1 hour
            Troubleshooting and regression testing with KRAD sampleapp


            • Assignee:
              mwfyffe Mark Fyffe (Inactive)
              jkneal Jerry Neal (Inactive)
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created:

                Time Tracking

                Original Estimate - 2 days
                Remaining Estimate - 0 minutes
                Time Spent - 2 days