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

View dialogs with required fields cause client-side validation to always fail

    Details

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

      Description

      Actions with client-side validation enabled on views with dialogs with required fields that aren't displayed cause validations to always fail and no messages to appear on the page. The following dialog is added as a dialog view

          <bean id="PropDev-AttachmentsPage-ProposalDetails" parent="PropDev-AttachmentsPage-ProposalDetails-parentBean"/>
          <bean id="PropDev-AttachmentsPage-ProposalDetails-parentBean" abstract="true" parent="Uif-DialogGroup"
                p:fieldBindingObjectPath="proposalDevelopmentAttachmentHelper"
                p:header.headerText="Details">
              <property name="items">
                  <list>
                      <bean parent="Uif-InputField" p:propertyName="narrative.narrativeTypeCode"
                            p:readOnlyDisplayReplacementPropertyName="narrative.narrativeType.description"
                            p:enableAutoQuickfinder="false"
                            p:order="10" />
                      <bean parent="Uif-InputField" p:propertyName="narrative.moduleStatusCode"
                            p:readOnlyDisplayReplacementPropertyName="narrative.narrativeStatus.description"
                            p:enableAutoQuickfinder="false"
                            p:required="true" p:readOnly="false" p:order="20" />
                      <bean parent="Uif-InputField" p:propertyName="narrative.contactName"
                            p:order="30" />
                      <bean parent="Uif-InputField" p:propertyName="narrative.emailAddress"
                            p:order="40" />
                      <bean parent="Uif-InputField" p:propertyName="narrative.phoneNumber"
                            p:order="50" />
                      <bean parent="Uif-InputField" p:propertyName="narrative.comments"
                            p:order="60" />
                      <bean parent="Uif-InputField" p:propertyName="narrative.moduleTitle"
                            p:order="70" />
                      <bean parent="Uif-InputField" p:propertyName="narrative.multipartFile" p:fieldLabel.labelText="File"
                            p:order="80">
                          <property name="control">
                              <bean parent="Uif-FileControl"/>
                          </property>
                      </bean>
                  </list>
              </property>
              <property name="footer">
                  <bean parent="Uif-FooterBase">
                      <property name="items">
                          <list>
                              <bean parent="Uif-PrimaryActionButton" p:actionLabel="Save" p:methodToCall="addNarrative"
                                    p:refreshId="PropDev-AttachmentsPage-ProposalCollection-Collection"
                                    p:actionParameters="propertyName:narratives"
                                    p:onClickScript="dismissDialog('PropDev-AttachmentsPage-ProposalDetails')"
                                    p:render="@{proposalDevelopmentAttachmentHelper.selectedLineIndex eq null}" p:order="10"/>
                              <bean parent="Uif-PrimaryActionButton" p:actionLabel="Save" p:methodToCall="saveNarrative"
                                    p:refreshId="PropDev-AttachmentsPage-ProposalCollection-Collection"
                                    p:onClickScript="dismissDialog('PropDev-AttachmentsPage-ProposalDetails')"
                                    p:render="@{proposalDevelopmentAttachmentHelper.selectedLineIndex ne null}" p:order="20"/>
                              <bean parent="Uif-DialogDismissButton" p:actionLabel="Cancel" p:order="30"/>
                          </list>
                      </property>
                  </bean>
              </property>
          </bean>
      

      In which both moduleStatusCode and narrativeTypeCode are required fields due to the DD. Debugging into the JS validation methods I finally found the following

      errorMap: Object
      proposalDevelopmentAttachmentHelper.narrative.moduleStatusCode: "Required"
      proposalDevelopmentAttachmentHelper.narrative.narrativeTypeCode: "Required"
      

      Although these errors do not bubble up to the page level to be displayed to users. This appears to affect all actions on the page with client-side validation enabled. Included those in other unassociated dialogs.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              bsmith Brian Smith (Inactive)
              Reporter:
              dpace Douglas Pace
            • 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:
                Time Spent - 23 minutes Remaining Estimate - 4 hours
                4h
                Logged:
                Time Spent - 23 minutes Remaining Estimate - 4 hours
                23m