[KULRICE-13053] View dialogs with required fields cause client-side validation to always fail Created: 31/Jul/14  Updated: 24/Sep/14  Resolved: 31/Jul/14

Status: Closed
Project: Kuali Rice Development
Component/s: Development, User Experience (UX)
Affects Version/s: None
Fix Version/s: 2.5
Security Level: Public (Public: Anyone can view)

Type: Bug Fix Priority: Blocker
Reporter: Douglas Pace Assignee: Brian Smith (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 4 hours
Time Spent: 23 minutes
Original Estimate: 4 hours

Issue Links:
Rely
Epic Link: Technical Issues
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.


Generated at Mon Aug 10 22:37:32 CDT 2020 using JIRA 7.0.11#70121-sha1:19d24976997c1d95f06f3e327e087be0b71f28d4.