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

defaultValue not applied before disabled expression evaluation on initialization

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.2
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-10395Allow for disabled expressions to be partially evaluated server side
      KULRICE-8948Properties on collection items not getting expressions processed before build line
      KULRICE-8126Collection control does not honor disable if disable is disabled by an expression for collection refresh
      KULRICE-7053spring expression error on refresh
      KULRICE-9883Boolean property value is evaluated as string instead of a boolean
      KULRICE-11868Expression error in testColumnCalculations during apply model phase
      KULRICE-7835expressions not being evaluated on line actions within a collection
      KULRICE-8319Expressions not being evaluated for components in a dialog group
      KULRICE-8101Expressions not evaluated on tooltip content
      KULRICE-11584Allow required to use expressions (like disabled)
    • Rice Module:
      KRAD
    • Application Requirement:
      KS My Plan
    • Sprint:
      2.3.2 Sprint 1
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      Using the client side disable, I have two controls set to be disabled until a radio group value equals 'course'. I have set the radio group default value to be 'course', so the option is selected on load, but the two controls are disabled initially. I can change the radio group and switch it back to 'course' and then the controls are enabled. It seems like the disabled condition is not happening initially. It appears the disabled expressions are evaluated before the default value is being applied.

      Current workaround was to set the value when defining the property in the form.

      Here are some code snippets:

      Radio group input:

      <bean parent="Uif-InputField" p:propertyName="type" p:defaultValue="course">
      <property name="control">
      <bean parent="Uif-VerticalRadioControl">
      <property name="options">
      <list>
      <bean parent="Uif-KeyLabelPair" p:key="course" p:value="Course or a course placeholder"/>
      <bean parent="Uif-KeyLabelPair" p:key="general" p:value="General placeholder"/>
      </list>
      </property>
      </bean>
      </property>
      </bean>

      Two controls that should be disabled if 'type' does not equal 'course':

      <bean parent="Uif-InputField" p:propertyName="courseCd">
      <property name="control">
      <bean parent="Uif-TextControl">
      <property name="watermarkText" value="e.g. BIOL 180"/>
      <property name="maxLength" value="11"/>
      <property name="disabled" value="@

      {#form.type NE 'course'}"/>
      </bean>
      </property>
      </bean>
      <bean parent="Uif-InputField" p:propertyName="credit">
      <property name="control">
      <bean parent="dropdownPlaceholderCredits" p:disabled="@{#form.type NE 'course'}

      "/>
      </property>
      </bean>

        Activity

        Hide
        Garett Gowens added a comment -

        We have noticed this problem happening on progressiveRender expressions as well, where the expression is evaluated before the defaultValue is set.

        Show
        Garett Gowens added a comment - We have noticed this problem happening on progressiveRender expressions as well, where the expression is evaluated before the defaultValue is set.

          People

          • Assignee:
            Brian Smith (Inactive)
            Reporter:
            Garett Gowens
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 4 hours Original Estimate - 4 hours
              4h
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 day
              1d

                Agile

                  Structure Helper Panel