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

KS Rice 2.4 Upgrade - subCollection updateComponent is null

    Details

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

      Description

      We are using subCollection property (see AcademicTermPage.xml for details):
      <bean id="KS-KeyDatesGroup-EditSubSection"
      parent="KS-Uif-StackedCollectionSubSection-HorizontalSubCollectionFieldGroupWithDisclosure"
      ...
      <property name="subCollections">
      <list>
      <ref bean="KS-KeyDates-EditSubSection"/>
      </list>
      </property>
      </bean>

      where

      <bean id="KS-KeyDates-EditSubSection" parent="Uif-Disclosure-TableSubCollection-WithinSubSection"
      ...
      <property name="addBlankLineAction">
      ...
      </bean>

      However when I try to "Add Blank Line" (= "Add Key Date") I'm getting error.

      Here is what debugging gives me:

      In UifControllerHelper.prepareViewForRendering Component updateComponent = null. The reason is that for form.getViewPostMetadata()..getComponentPostMetadata(updateComponentId) (updateComponentId = "acal-term-keydates_line0_line0" in our case) we have path = "currentPage.items[1].items[1].items[1].layoutManager.stackedGroupsNoWrapper[1].items[1].group.layoutManager.stackedGroupsNoWrapper[1].items[0].group".

      However there is no such property value on view:
      ObjectPropertyUtils.getPropertyValue(view = form.getView(), componentPostMetadata.getPath() = path from above) returns nothing.

      When I evaluate the view in IntelliJ I can only get up to currentPage.items[1].items[1].items[1].layoutManager.stackedGroupsNoWrapper[1].items[1].group.layoutManager.stackedGroupsNoWrapper[1].items[0] -> there is NO group there.

      ((GroupBase)((StackedLayoutManagerBase) ((CollectionGroupBase) ((FieldGroup)((GroupBase)((StackedLayoutManagerBase) ((CollectionGroupBase) ((TabGroup) ((TabGroup) ((TabGroup) (view.getCurrentPage().getItems().get(1))).getItems().get(1))).getItems().get(1)).getLayoutManager()).getStackedGroupsNoWrapper().get(1)).getItems().get(1)).getGroup()).getLayoutManager()).getStackedGroupsNoWrapper().get(1)).getItems().get(0) -> InputFieldBase element (no group)

      So there is a mismatch between the ComponentPostMetadata and the view.

      ----------------------------------------------------------------------------------------

      I also tried to debug usual collection (no subCollection property):
      <bean id="KS-ExamDates-EditSubSection"
      parent="KS-Uif-Disclosure-TableSubCollection-WithinSubSection-BottomAddLine-ExamPeriod"
      ...
      <property name="addBlankLineAction.actionLabel" value="Add Final Exam Period"/>
      ...
      </bean>

      And the path = "currentPage.items[1].items[1].items[1].layoutManager.stackedGroupsNoWrapper[1].items[2].group"

      It does exist in view
      ((FieldGroup)((GroupBase)((StackedLayoutManagerBase) ((CollectionGroupBase) ((TabGroup) ((TabGroup) ((TabGroup) (view.getCurrentPage().getItems().get(1))).getItems().get(1))).getItems().get(1)).getLayoutManager()).getStackedGroupsNoWrapper().get(1)).getItems().get(2)).getGroup() so returned updateComponent is not null.

        Attachments

          Issue Links

            Activity

            Hide
            haroon.rafique Haroon Rafique (Inactive) added a comment -

            Some of the extended UIF Components:

            <bean id="KS-Uif-StackedCollectionSubSection-HorizontalSubCollectionFieldGroupWithDisclosure"
                  parent="KS-Uif-StackedCollectionSubSection-HorizontalSubCollectionFieldGroup">
                <property name="disclosure.render" value="true"/>
            </bean>
            
            <bean id="KS-Uif-StackedCollectionSubSection-HorizontalSubCollectionFieldGroup"
                  parent="Uif-StackedCollectionSubSection">
                <property name="layoutManager">
                    <bean parent="Uif-StackedCollectionLayout-WithBoxItems">
                        <property name="subCollectionFieldGroupPrototype">
                            <bean parent="Uif-HorizontalFieldGroup"/>
                        </property>
                    </bean>
                </property>
                <property name="items">
                    <list/>
                </property>
            </bean>
            
            Show
            haroon.rafique Haroon Rafique (Inactive) added a comment - Some of the extended UIF Components: <bean id= "KS-Uif-StackedCollectionSubSection-HorizontalSubCollectionFieldGroupWithDisclosure" parent= "KS-Uif-StackedCollectionSubSection-HorizontalSubCollectionFieldGroup" > <property name= "disclosure.render" value= "true" /> </bean> <bean id= "KS-Uif-StackedCollectionSubSection-HorizontalSubCollectionFieldGroup" parent= "Uif-StackedCollectionSubSection" > <property name= "layoutManager" > <bean parent= "Uif-StackedCollectionLayout-WithBoxItems" > <property name= "subCollectionFieldGroupPrototype" > <bean parent= "Uif-HorizontalFieldGroup" /> </property> </bean> </property> <property name= "items" > <list/> </property> </bean>
            Hide
            jkneal Jerry Neal (Inactive) added a comment -

            Brian,

            Note this is on 2.4.

            Jerry

            Show
            jkneal Jerry Neal (Inactive) added a comment - Brian, Note this is on 2.4. Jerry

              People

              • Assignee:
                jkneal Jerry Neal (Inactive)
                Reporter:
                lsymms Larry Symms
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 day Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 days
                  3d