Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-6709

Configuring separate add line fields for a collection causes and exception when attempting to add a line

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-rc4, 2.0
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-8504TableLayout Collection does not render correctly with separate add line
      KULRICE-12134Add line highlighting incorrect when using separate add line functionality
      KULRICE-5299Add line on collections not checking required fields and not refreshing just the collection group
      KULRICE-9691js error when delete the last line from collection with Add Blank Line button
      KULRICE-5786Error messages not visible on sub-collection add line
      KULRICE-12670Input field not rendering on collection add line item
      KULRICE-5346Delete collection line on editing maintenance doc - not deleting old collection line
      KULRICE-8475Collections configuration test view: Refreshing stacked collection two times causes exception
      KULRICE-8951Property editors not getting picked up on add line and collection line items
      KULRICE-6621Related keys on collections are not being set on add line
    • Rice Module:
      KRAD
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      This is the description from Venkat:

      <property name="addLineFields">
      <list>
      <bean parent="Uif-InputField" p:propertyName="startDate" p:label="Start Date" p:required="true">
      <property name="control">
      <bean parent="Uif-DateControl" p:size="10" p:watermarkText="mm/dd/yyyy"/>
      </property>
      </bean>
      </list>
      </property>

      Error

      java.lang.ClassCastException: org.kuali.rice.krad.uif.widget.LightBox cannot be cast to org.kuali.rice.krad.uif.field.Field
      at org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.performComponentLifecycle(ViewHelperServiceImpl.java:256)
      at org.kuali.rice.krad.web.controller.UifControllerBase.updateComponent(UifControllerBase.java:414)
      at org.kuali.rice.krad.web.controller.UifControllerBase.addLine(UifControllerBase.java:183)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
      at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
      at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900)

      We don't currently have a test case for this. In the kitchen sink we have collection6 which uses the 'separateAddLine', however it uses the same fields as existing. We should modify that to also specify 'addLineFields' (making it a slightly different set) so we can test this.

      Looks like it is getting mixed up in the updateComponent where it tries to get all the children to update the refresh component state. Likely an ID problem.

        Activity

        Hide
        Jerry Neal (Inactive) added a comment -

        Samuel, please make this a priority since it is a 2.0 issue.

        Show
        Jerry Neal (Inactive) added a comment - Samuel, please make this a priority since it is a 2.0 issue.
        Hide
        Samuel Holtzkampf (Inactive) added a comment -

        Had to add addLioneFields to getComponentsForLifecycle() in CollectionGroup to be able to see controls on add line fields. After that fix I could not reproduce the bug even when adding a date field control.

        Show
        Samuel Holtzkampf (Inactive) added a comment - Had to add addLioneFields to getComponentsForLifecycle() in CollectionGroup to be able to see controls on add line fields. After that fix I could not reproduce the bug even when adding a date field control.
        Hide
        Jerry Neal (Inactive) added a comment -

        Samuel,

        I had to revert this change because I found that all lookup requests were broken. These result in this exception:

        java.lang.RuntimeException: Exception evaluating expression: #ViewHelper.allowsMaintenanceEditAction(#line) at org.kuali.rice.krad.uif.service.impl.ExpressionEvaluatorServiceImpl.evaluateExpression(ExpressionEvaluatorServiceImpl.java:118) at org.kuali.rice.krad.uif.service.impl.ExpressionEvaluatorServiceImpl.evaluatePropertyExpressions(ExpressionEvaluatorServiceImpl.java:220) at org.kuali.rice.krad.uif.service.impl.ExpressionEvaluatorServiceImpl.evaluateObjectExpressions(ExpressionEvaluatorServiceImpl.java:59) at org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.performComponentApplyModel(ViewHelperServiceImpl.java:660) at

        We'll have to take another look at this and figure out how to resolve the original issue in another way, or put in something to prevent this.

        jerry

        Show
        Jerry Neal (Inactive) added a comment - Samuel, I had to revert this change because I found that all lookup requests were broken. These result in this exception: java.lang.RuntimeException: Exception evaluating expression: #ViewHelper.allowsMaintenanceEditAction(#line) at org.kuali.rice.krad.uif.service.impl.ExpressionEvaluatorServiceImpl.evaluateExpression(ExpressionEvaluatorServiceImpl.java:118) at org.kuali.rice.krad.uif.service.impl.ExpressionEvaluatorServiceImpl.evaluatePropertyExpressions(ExpressionEvaluatorServiceImpl.java:220) at org.kuali.rice.krad.uif.service.impl.ExpressionEvaluatorServiceImpl.evaluateObjectExpressions(ExpressionEvaluatorServiceImpl.java:59) at org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.performComponentApplyModel(ViewHelperServiceImpl.java:660) at We'll have to take another look at this and figure out how to resolve the original issue in another way, or put in something to prevent this. jerry
        Hide
        Jessica Coltrin (Inactive) added a comment -

        Closing since these items are now in the release notes.

        Show
        Jessica Coltrin (Inactive) added a comment - Closing since these items are now in the release notes.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Structure Helper Panel