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

Server side paging does not work when collection contains a field group

    Details

    • Type: Bug Fix
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4.2
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Rice Module:
      KRAD
    • Application Requirement:
      KC
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      When you have a field group in a collection with server side paging turned on, attempting to retrieve a page causes an infinite loop:

      at org.kuali.rice.krad.util.KRADUtils.getSimpleFieldValue(KRADUtils.java:1328)
      at org.kuali.rice.krad.util.KRADUtils.getSimpleFieldValue(KRADUtils.java:1328)
      at org.kuali.rice.krad.util.KRADUtils.getSimpleFieldValue(KRADUtils.java:1328)
      at org.kuali.rice.krad.util.KRADUtils.getSimpleFieldValue(KRADUtils.java:1328)
      at org.kuali.rice.krad.util.KRADUtils.getSimpleFieldValue(KRADUtils.java:1328)
      at org.kuali.rice.krad.util.KRADUtils.getSimpleFieldValue(KRADUtils.java:1328)
      at org.kuali.rice.krad.util.KRADUtils.getSimpleFieldValue(KRADUtils.java:1328)
      at org.kuali.rice.krad.util.KRADUtils.getSimpleFieldValue(KRADUtils.java:1328)

      This is because the code here is passing in the same field on the recursive call:

      } else if (field instanceof FieldGroup
      && ((FieldGroup) field).getGroup() != null
      && ((FieldGroup) field).getGroup().getItems() != null
      && !((FieldGroup) field).getGroup().getItems().isEmpty()) {
      // using first components type for assumed value
      Component firstComponent = ((FieldGroup) field).getGroup().getItems().get(0);

      // check first component type to extract value
      if (firstComponent != null && firstComponent instanceof Field)

      { value = getSimpleFieldValue(model, field); }

      It should pass in firstComponent like this:

      // check first component type to extract value
      if (firstComponent != null && firstComponent instanceof Field)

      { value = getSimpleFieldValue(model, firstComponent); }

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              jkneal Jerry Neal (Inactive)
              Reporter:
              jkneal Jerry Neal (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified