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

Error using spring expressions inside rich messaging components

    Details

    • Type: Bug Fix
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Development
    • Labels:
    • Rice Module:
      KRAD
    • Application Requirement:
      KS
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      Getting error when attempting to use spring expressions inside rich messaging components. Suspect that the context is not getting passed into the components.

      Rice User Group Topic:

      Collection Header with Rich messaging and Expressions

      Error:

      java.lang.RuntimeException: Exception evaluating expression: #line.official

      Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1007E:(pos 6): Field or property 'official' cannot be found on null

      (I've also noticed that #index is evaluating to "". Both of these expressions are used as normal in the items section without problems.)

      Code Example:

      <bean id="KS-AcademicTerm-EditSection-Main" parent="KS-Uif-StackedCollectionSection-VerticalSubCollectionFieldGroup">

      <property name="id" value="acal-term"/>

      <property name="readOnly" value="@

      {#view.readOnly}

      "/>

      <property name="propertyName" value="termWrapperList" />

      <property name="collectionObjectClass" value="org.kuali.student.enrollment.class2.acal.dto.AcademicTermWrapper" />

      <property name="style" value="min-width:70em;"/>

      <property name="header.render" value="false" />

      <property name="layoutManager.addLineGroup.header.render" value="false"/>

      <property name="layoutManager.lineGroupPrototype">

      <bean parent="Uif-CollectionVerticalBoxItem">

      <property name="disclosure.render" value="true"/>

      <property name="header">

      <bean parent="Uif-HeaderFour">

      <property name="headerText" value="@

      {#line.termNameForUI}

      [id=TermHeader-Actions]"/>

      <property name="inlineComponents">

      <list>

      <bean id="TermHeader-Actions" parent="Uif-HorizontalBoxGroup">

      <property name="items">

      <list>

      <bean parent="KS-Lozenge-Green-Uif-Message"

      p:messageText="Official" p:render="@

      {#line.official}

      "/>

      <bean parent="KS-Lozenge-Grey-Uif-Message"

      p:messageText="Draft" p:render="@

      {!#line.official}

      "/>

      <bean parent="Uif-ActionLink"

      p:methodToCall="deleteTerm" p:actionLabel="Delete Draft"

      p:onClickScript="writeHiddenToForm("actionParameters[selectedLineIndex]","@

      {#index}

      ");"/>

      </list>

      </property>

      </bean>

      </list>

      </property>

      </bean>

      </property>

      </bean>

      </property>

        Attachments

          Issue Links

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                Unassigned
                Reporter:
                lsymms Larry Symms
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: