Details

    • Type: Bug Fix
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Rice Module:
      KRAD
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      A null pointer expression occurs when an expression is used for the disabled property:
      https://groups.google.com/a/kuali.org/group/rice.usergroup.krad/browse_thread/thread/52bbf392a44c312d#

      Reported by Bob Hurt via rice.usergroup.krad@kuali.org:

      I have a TableCollectionSection and one of its items is:

      <bean parent="Uif-InputField" p:propertyName="startTimeAmPm"
      p:refreshWhenChanged="#lp.startTime">
      <property name="control">
      <bean parent="Uif-DropdownControl"
      p:options-ref="hctime-options"
      p:disabled="@

      {#empty(#lp.startTime)}

      "/>
      </property>
      </bean>

      This field is a dropdown for selecting "am" or "pm", and should be disabled when the field directly in front of it, startTime, is empty. The control's "disabled" property works when the page is initially displayed, but when startTime is changed I get the following runtime exception:

      java.lang.RuntimeException: Exception evaluating expression: #empty(.startTime) at
      ...
      < stacktrace left out >

        Attachments

          Activity

          Hide
          vpremcha Venkat PremChandran (Inactive) added a comment -

          Thanks Eric for this fix. I'm hoping this should fix issues related to refreshWhenChanged() when used within a collection

          Show
          vpremcha Venkat PremChandran (Inactive) added a comment - Thanks Eric for this fix. I'm hoping this should fix issues related to refreshWhenChanged() when used within a collection
          Hide
          kunadawa Eric Njogu (Inactive) added a comment -

          Looking at org.kuali.rice.krad.uif.util.ExpressionUtils#getLinePathPrefixValue, the prefix #lp is replaced by a blank string when a collection group is not found in the component's context. Longer code extracts might help to shed light on this.

          Show
          kunadawa Eric Njogu (Inactive) added a comment - Looking at org.kuali.rice.krad.uif.util.ExpressionUtils#getLinePathPrefixValue, the prefix #lp is replaced by a blank string when a collection group is not found in the component's context. Longer code extracts might help to shed light on this.

            People

            • Assignee:
              kunadawa Eric Njogu (Inactive)
              Reporter:
              vpremcha Venkat PremChandran (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: