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

Uif Framework - support for references to refresh

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-m6, 2.0
    • Fix Version/s: 2.5
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Rice Module:
      KRAD
    • KRAD Feature Area:
      Lookup
    • Sprint:
      Core 2.5.0-m6 Sprint 1
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Include in Release Notes?:
      Yes
    • Story Points:
      5

      Description

      Need support for references to refresh coming from a lookup return. From the UifControllerBase#refresh method we can call the
      view helper service passing the references to refresh which will then do the refresh. This will cover the support needed on maintenance as well.

      In addition, verify we are allowing the references to refresh configuration on the quickfinder widget, and it is getting correctly sent to the lookup and returned.

        Attachments

          Issue Links

            Activity

            Hide
            ewestfal Eric Westfall added a comment -

            Bulk update of incomplete 2.0.0-b2 issues to just a 2.0 fix version.

            Show
            ewestfal Eric Westfall added a comment - Bulk update of incomplete 2.0.0-b2 issues to just a 2.0 fix version.
            Hide
            kbtaylor Kristina Taylor (Inactive) added a comment -

            There is code included here but it doesn't seem to be there for JPA. Shelving pending response from Jonathan.

            Show
            kbtaylor Kristina Taylor (Inactive) added a comment - There is code included here but it doesn't seem to be there for JPA. Shelving pending response from Jonathan.
            Hide
            jkneal Jerry Neal (Inactive) added a comment -

            I contacted JPA team and linked the related issue they are working on.

            Show
            jkneal Jerry Neal (Inactive) added a comment - I contacted JPA team and linked the related issue they are working on.
            Hide
            kbtaylor Kristina Taylor (Inactive) added a comment -

            This still appears to be not converted for JPA. It may be an easy fix though; can we have someone from that team look at it?

            Show
            kbtaylor Kristina Taylor (Inactive) added a comment - This still appears to be not converted for JPA. It may be an easy fix though; can we have someone from that team look at it?
            Hide
            ewestfal Eric Westfall added a comment -

            There should be a capability for refreshing now on the DataObjectWrapper

            Show
            ewestfal Eric Westfall added a comment - There should be a capability for refreshing now on the DataObjectWrapper
            Hide
            kbtaylor Kristina Taylor (Inactive) added a comment -

            Even if the capability is there, it's not being used in the right place so we need someone from the JPA team to take a look at this piece of code.

            Show
            kbtaylor Kristina Taylor (Inactive) added a comment - Even if the capability is there, it's not being used in the right place so we need someone from the JPA team to take a look at this piece of code.
            Hide
            kbtaylor Kristina Taylor (Inactive) added a comment -

            I can't seem to get the example I created (Labs -> Kitchen Sink -> Lookups -> Bottom of the page) to work with the current objects, so it will have to probably be changed to different objects. The point for that one is that once you look up something in a lookup, anything in the references to refresh list should be linked in ViewHelperServiceImpl.refreshReference. So once the lookup returns, the linked object should be filled and any fields from that linked object should now display.

            Show
            kbtaylor Kristina Taylor (Inactive) added a comment - I can't seem to get the example I created (Labs -> Kitchen Sink -> Lookups -> Bottom of the page) to work with the current objects, so it will have to probably be changed to different objects. The point for that one is that once you look up something in a lookup, anything in the references to refresh list should be linked in ViewHelperServiceImpl.refreshReference . So once the lookup returns, the linked object should be filled and any fields from that linked object should now display.
            Hide
            kbtaylor Kristina Taylor (Inactive) added a comment -

            I did a more in-depth review of this one. I updated the example to work when this work is complete. Currently, there is a block of code in ViewHelperServiceImpl.refereshReference which prevents any JPA code from erroring out when using the LegacyDataAdapter:

            if (!(parentObject instanceof PersistableBusinessObjectBaseAdapter)) {
                LOG.warn("Could not refresh reference " + referenceObjectName + " off class " + parentObject.getClass().getName() + ". Class not of type PersistableBusinessObject");
                return;
            }
            

            With JPA, the following should be added:

            KRADServiceLocator.getDataObjectService().wrap(parentObject).fetchRelationship(referenceObjectName);
            

            but both methods should be allowed, so the solution here is to detect whether or not we are in legacy mode or not and apply the correct refresh method.

            Show
            kbtaylor Kristina Taylor (Inactive) added a comment - I did a more in-depth review of this one. I updated the example to work when this work is complete. Currently, there is a block of code in ViewHelperServiceImpl.refereshReference which prevents any JPA code from erroring out when using the LegacyDataAdapter : if (!(parentObject instanceof PersistableBusinessObjectBaseAdapter)) { LOG.warn( "Could not refresh reference " + referenceObjectName + " off class " + parentObject.getClass().getName() + ". Class not of type PersistableBusinessObject" ); return ; } With JPA, the following should be added: KRADServiceLocator.getDataObjectService().wrap(parentObject).fetchRelationship(referenceObjectName); but both methods should be allowed, so the solution here is to detect whether or not we are in legacy mode or not and apply the correct refresh method.
            Hide
            jruch Jeff Ruch added a comment -

            Updated refreshReference per Kristina's comment. Tested the example in kitchen sink along with the demo look-ups.

            Show
            jruch Jeff Ruch added a comment - Updated refreshReference per Kristina's comment. Tested the example in kitchen sink along with the demo look-ups.

              People

              • Assignee:
                jruch Jeff Ruch
                Reporter:
                jkneal Jerry Neal (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h