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

required validation fails in StackedCollectionSubSection addLine

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2.0-m1
    • Fix Version/s: 2.2.0-rc1, 2.2
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-9586Need to avoid required validation checks on addLine
      KULRICE-7110Conditional requirement bug in a Collection's addline
      KULRICE-11813Update Collection Addline in Lightbox AFT to check validation tooltip
      KULRICE-12923addLine does not work inside addDialog when used in a StackedCollection
      KULRICE-12581addViaLightBox validating addLineGroup when the light box is not rendered
      KULRICE-13053View dialogs with required fields cause client-side validation to always fail
      KULRICE-6665Validation being skipped for some field types on an addLine js call
      KULRICE-11064Progressive Render - Required field validation issue on Save button click
      KULRICE-6666Validation causes Javascript error with an addLine containing a checkbox or radio
      KULRICE-14043QuickFinder on Collection AddLine causes JavaScript Errors
    • Rice Module:
      KRAD
    • KRAD Feature Area:
      UIF Component
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      we have a single DropDownControl field in the addLine of a Uif-Disclosure-StackedCollectionSubSection that is required, and the first option has a key="" and value="Select Keydate Group Type". if the field is put into focus and then the "add" button for the addLine is clicked, the "Required" error appears as expected but there is no window.alert that says something like "This addition contains errors. Please correct these errors and try again." if the user does NOT put the dropdown into focus before clicking "add", there is no validation error at all - the "Updating" overlay appears briefly and then the page is redisplayed exactly as before; the user gets no feedback as to what happened.

      the StackedCollectionSubSection is a list item in the subCollections property of a Uif-Disclosure-StackedCollectionSection. the parent collection also has a dropdown field in the addLine which is required, along with two required date fields. when the "add" button is clicked on the parent collection the "Required" errors appear on all three fields and a window.alert appears, as expected. (altho the alert may be getting displayed because of the required date fields).

        Issue Links

          Activity

          Hide
          Jerry Neal (Inactive) added a comment -

          Hi Brian,

          Please create a documentation Jira for making this update to the KRAD book.

          thanks,
          Jerry

          Show
          Jerry Neal (Inactive) added a comment - Hi Brian, Please create a documentation Jira for making this update to the KRAD book. thanks, Jerry
          Hide
          Brian Smith (Inactive) added a comment - - edited

          By default LINE_FIRST is now used for focusOnIdAfterSubmit for add line buttons and can be set to any of these:

          • A valid element id
          • "FIRST" will focus on the first visible input element on the form
          • "SELF" will result in this Action being focused (action bean defaults to "SELF")
          • "LINE_FIRST" will result in the first input of the collection line to be focused (if available)
          • "NEXT_INPUT" will result in the next available input that exists after this Action to be focused (only if this action still exists on the page)

          NEXT_INPUT would probably be the best to use to get the functionality you want above

          Show
          Brian Smith (Inactive) added a comment - - edited By default LINE_FIRST is now used for focusOnIdAfterSubmit for add line buttons and can be set to any of these: A valid element id "FIRST" will focus on the first visible input element on the form "SELF" will result in this Action being focused (action bean defaults to "SELF") "LINE_FIRST" will result in the first input of the collection line to be focused (if available) "NEXT_INPUT" will result in the next available input that exists after this Action to be focused (only if this action still exists on the page) NEXT_INPUT would probably be the best to use to get the functionality you want above
          Hide
          Bob Hurt (Inactive) added a comment -

          okay, that makes sense.

          Show
          Bob Hurt (Inactive) added a comment - okay, that makes sense.
          Hide
          Brian Smith (Inactive) added a comment -

          When you click Add in a collection it will refocus on the first field of the add line. In this case it focuses on Key Date Group Type dropdown after you add one, so you can add another one if you wanted to. By instead clicking on the subcollection's add button that field is now losing focus causing a required error to occur (since Key Date Group Type is required to add another one for the parent collection)

          Show
          Brian Smith (Inactive) added a comment - When you click Add in a collection it will refocus on the first field of the add line. In this case it focuses on Key Date Group Type dropdown after you add one, so you can add another one if you wanted to. By instead clicking on the subcollection's add button that field is now losing focus causing a required error to occur (since Key Date Group Type is required to add another one for the parent collection)
          Hide
          Bob Hurt (Inactive) added a comment -

          This happens because after the add it re-focuses on the first field of the add line for the collection to allow quick entry of multiple lines.

          belated comment: by "first field of the add line" do you mean the Key Date Group Type dropdown to add a subcollection, or the Key Date Type dropdown that is the first field of the subcollection's add line? it seems like the focus should be on the latter because that's the add line button that was clicked.

          Show
          Bob Hurt (Inactive) added a comment - This happens because after the add it re-focuses on the first field of the add line for the collection to allow quick entry of multiple lines. belated comment: by "first field of the add line" do you mean the Key Date Group Type dropdown to add a subcollection, or the Key Date Type dropdown that is the first field of the subcollection's add line? it seems like the focus should be on the latter because that's the add line button that was clicked.

            People

            • Assignee:
              Brian Smith (Inactive)
              Reporter:
              Bob Hurt (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Structure Helper Panel