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

Validation messages on tree node components not displayed correctly

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4.2, 2.5
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-5251Fix binding issues in TreeGroup and ComponentUtils that are preventing trees with AttributeFields in the nodes from rendering
      KULRICE-5732KRAD: validation display in boxLayoutVerticalItem does not float correctly
      KULRICE-5238build agenda tree UI components
      KULRICE-9708componentUpdate does not handle unmatched validation messages returned from the server correctly
      KULRICE-13122Tree group invokes nested property for every node which causes performance issues
      KULRICE-11394DatePicker does not work in a tree.
      KULRICE-6278Add NODE or similar context variable to reference the current node being rendered
      KULRICE-6011Proposition tree data groups are not showing up
      KULRICE-7730Validation message tooltips not displaying
      KULRICE-6358refreshing components in the tree doesn't work, binding path gets mangled
    • Application Requirement:
      KS
    • Sprint:
      Core 2.5.0-m3 Sprint 2
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      Required validation message is not displayed correctly in tree nodes when it is the only component with an error.

      XML Configuration:

      <bean parent="Uif-InputField" p:propertyName="stringField1"
                            p:required="true" p:labelPlacement="TOP" p:fieldLabel.cssClasses="labelTop"/>
      
                      <bean parent="Uif-TreeSection">
                          <property name="propertyName" value="tree2"/>
                          <property name="defaultNodePrototype">
                              <bean class="org.kuali.rice.krad.uif.container.NodePrototype">
                                  <property name="labelPrototype">
                                      <bean parent="Uif-Message"/>
                                  </property>
                                  <property name="dataGroupPrototype">
                                      <bean parent="Uif-VerticalBoxGroup" p:style="margin-left: 2em;">
                                          <property name="items">
                                              <list>
                                                  <bean parent="Uif-HorizontalFieldGroup">
                                                      <property name="items">
                                                          <list>
                                                              <bean id="UifCompView-OtherField4" parent="Uif-InputField" p:propertyName="field1"
                                                                    p:required="true" p:labelPlacement="TOP" p:fieldLabel.cssClasses="labelTop"/>
                                                              <bean id="UifCompView-OtherField5" parent="Uif-InputField" p:propertyName="field2"
                                                                    p:required="true" p:labelPlacement="TOP" p:fieldLabel.cssClasses="labelTop"/>
                                                              <bean id="UifCompView-OtherField6" parent="Uif-InputField" p:propertyName="field3"
                                                                    p:required="true" p:labelPlacement="TOP" p:fieldLabel.cssClasses="labelTop"/>
                                                              <bean id="UifCompView-OtherField7" parent="Uif-InputField" p:propertyName="field4"
                                                                    p:required="true" p:labelPlacement="TOP" p:fieldLabel.cssClasses="labelTop"/>
                                                          </list>
                                                      </property>
                                                  </bean>
                                              </list>
                                          </property>
                                      </bean>
                                  </property>
                              </bean>
                          </property>
                      </bean>
      
                      <!--
                          Uif-FooterBase should normally appear in the "footer" property of the
                          Page component, but it can be moved around when desired...
                      -->
                      <bean parent="Uif-FooterBase" p:style="margin-bottom:0;">
                          <property name="items">
                              <list>
                                  <bean parent="Uif-PrimaryActionButton-Small" p:performClientSideValidation="true">
                                      <!-- method saveForm() defined in KitchenSinkController.java: -->
                                      <property name="methodToCall" value="saveForm"/>
                                      <property name="actionLabel" value="Save Changes"/>
                                      <property name="loadingMessageText" value="Saving..."/>
                                  </bean>
                              </list>
                          </property>
                      </bean>
      

      NOTE: The beans are from the rice kitchen sink. I only added the extra required string field at the top and the save button with "performClientSideValidation" set as "true".

        Issue Links

          Activity

          Hide
          Kristina Taylor (Inactive) added a comment -

          Just did a brief check and this is working in 2.4, but I don't know what the fix was.

          Show
          Kristina Taylor (Inactive) added a comment - Just did a brief check and this is working in 2.4, but I don't know what the fix was.
          Hide
          Jessica Coltrin (Inactive) added a comment -

          If this is fixed in 2.4, we don't need to backport it to 2.3. Resolving.

          Show
          Jessica Coltrin (Inactive) added a comment - If this is fixed in 2.4, we don't need to backport it to 2.3. Resolving.
          Hide
          Larry Symms added a comment -

          confirmed fixed

          Show
          Larry Symms added a comment - confirmed fixed
          Hide
          Larry Symms added a comment -

          The previous confirmed resolution was not tested properly. Steps to reproduce can be found in KSENROLL-11041. Also added link to KSENROLL-10851 as it is another example of the same issue.

          Show
          Larry Symms added a comment - The previous confirmed resolution was not tested properly. Steps to reproduce can be found in KSENROLL-11041 . Also added link to KSENROLL-10851 as it is another example of the same issue.
          Hide
          Larry Symms added a comment - - edited

          From Brian Smith:
          add an override to remove the max-width on the uif-lightbox class or add a class that overrides it
          this was done for some purpose though, though I cant recall specifics
          (it may cause breakages if you make it a global override)

          or you can add it to the style itself for that case you want it on: max-width: none

          Show
          Larry Symms added a comment - - edited From Brian Smith : add an override to remove the max-width on the uif-lightbox class or add a class that overrides it this was done for some purpose though, though I cant recall specifics (it may cause breakages if you make it a global override) or you can add it to the style itself for that case you want it on: max-width: none
          Hide
          Kristina Taylor (Inactive) added a comment -

          I was able to reproduce this in the KRAD Sampleapp Kitchen Sink based on the instructions:

          1. Navigate to the Labs (The 2.4 link is currently http://env4.rice.kuali.org/kr-krad/labs?viewId=LabsMenuView)
          2. Click Kitchen Sink under Performance Views
          3. Click Other Fields
          4. Scroll down to Tree with Data Group
          5. Remove the data "1-A" in Item 1 Field 1 and hit the Save button

          You will see that the Growl message appears and that the field is red indicating it is required but that no red-framed error message is displayed anywhere on the page.

          Show
          Kristina Taylor (Inactive) added a comment - I was able to reproduce this in the KRAD Sampleapp Kitchen Sink based on the instructions: Navigate to the Labs (The 2.4 link is currently http://env4.rice.kuali.org/kr-krad/labs?viewId=LabsMenuView ) Click Kitchen Sink under Performance Views Click Other Fields Scroll down to Tree with Data Group Remove the data "1-A" in Item 1 Field 1 and hit the Save button You will see that the Growl message appears and that the field is red indicating it is required but that no red-framed error message is displayed anywhere on the page.
          Hide
          Kristina Taylor (Inactive) added a comment - - edited

          The problem is in how the tree names its nodes.

          <div id="UifCompView-OtherField3_tree" class="jstree jstree-11 jstree-focused jstree-default">
              <ul>
                  <li id="uin709q_node_0_parent_root" class="jstree-closed">
                      <div id="uin709q_node_0_parent_root" class="uif-verticalBoxGroup" data-parent="UifCompView-OtherField3" style="margin-left: 2em;"/>
                  </li>
              </ul>
          </div>
          

          The method handleMessagesAtGroup in krad.validate.js will recurse upwards in the tree, adding the field validation data to its parents until it reaches the page level The selector for the parent is jQuery("div#uin709q_node_0_parent_root").data("parent") but that will select the first node, not the node that has the parent. Thus, since the parent is undefined, it will stop its progress to avoid an error. We have decided to differentiate the ids by adding a _item to the id on the li, as such:

          <div id="UifCompView-OtherField3_tree" class="jstree jstree-11 jstree-focused jstree-default">
              <ul>
                  <li id="uin709q_node_0_parent_root_item" class="jstree-closed">
                      <div id="uin709q_node_0_parent_root" class="uif-verticalBoxGroup" data-parent="UifCompView-OtherField3" style="margin-left: 2em;"/>
                  </li>
              </ul>
          </div>
          

          Any application scripts selecting these elements will have to adjust their selectors.

          Show
          Kristina Taylor (Inactive) added a comment - - edited The problem is in how the tree names its nodes. <div id= "UifCompView-OtherField3_tree" class= "jstree jstree-11 jstree-focused jstree- default " > <ul> <li id= "uin709q_node_0_parent_root" class= "jstree-closed" > <div id= "uin709q_node_0_parent_root" class= "uif-verticalBoxGroup" data-parent= "UifCompView-OtherField3" style= "margin-left: 2em;" /> </li> </ul> </div> The method handleMessagesAtGroup in krad.validate.js will recurse upwards in the tree, adding the field validation data to its parents until it reaches the page level The selector for the parent is jQuery("div#uin709q_node_0_parent_root").data("parent") but that will select the first node, not the node that has the parent. Thus, since the parent is undefined, it will stop its progress to avoid an error. We have decided to differentiate the ids by adding a _item to the id on the li , as such: <div id= "UifCompView-OtherField3_tree" class= "jstree jstree-11 jstree-focused jstree- default " > <ul> <li id= "uin709q_node_0_parent_root_item" class= "jstree-closed" > <div id= "uin709q_node_0_parent_root" class= "uif-verticalBoxGroup" data-parent= "UifCompView-OtherField3" style= "margin-left: 2em;" /> </li> </ul> </div> Any application scripts selecting these elements will have to adjust their selectors.

            People

            • Assignee:
              Kristina Taylor (Inactive)
              Reporter:
              Larry Symms
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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

                  Agile

                    Structure Helper Panel