Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.0-m2, 2.3
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Rice Module:
      KRAD
    • KRAD Feature Area:
      Lookup
    • Application Requirement:
      Rice
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      In KNS you could apply conditional logic to the lookup criteria fields in Lookupable (applyConditionalLogicForFieldDisplay). This allows you to set a field to "readOnly", "required" or "hidden". The "readOnly" and "required" can be easily configured via UIF:

      <bean id="Sample-LookupView" parent="Uif-LookupView">
       ...
       <property name="criteriaFields">
         <list>
           <bean parent="Uif-LookupCriteriaInputField" p:propertyName="cd" 
                 p:readOnly="@{!#empty(#dp.lookupCriteria['cd'])}" />
           <bean parent="Uif-DataField" p:propertyName="description" 
                 p:required="@{#dp.lookupCriteria['CD'] == 'A_CD'}" />
         </list>
       </property>
       ...
      </bean>
      

      However, "hidden" isn't supported yet. When specifying

           <bean parent="Uif-LookupCriteriaInputField" p:propertyName="namespace" 
                 p:hidden="@{#dp.lookupCriteria['CD'] == 'A_CD'}" />
      

      the field itself is hidden but the lookup criteria row is still being rendered (see krad-context-type-hidden.png). What we want is to hide the entire row so that it is unnoticeable to the user while placing a hidden field into the table row (see kns-campus-type-code-displayed.png and kns-campus-type-code-hidden.png).

      Additional things I've noticed:

      • Specifying p:labelRendered="false" doesn't prevent the label to be rendered.
      • Specifying p:render="false" still renders a row without the content (see: krad-context-type-not-rendered.png)

      Additional ToDo:

      • Update Conversion Guide
      • Remove commented out code from LookupView.applyConditionalLogicForFieldDisplay()

        Attachments

          Issue Links

            Activity

            Hide
            cniesen Claus Niesen added a comment - - edited

            Email Communication

            From: Claus Niesen
            Sent: Monday, March 04, 2013 2:52 PM
            To: Jerry Neal; Brian Smith
            Subject: Conditionally render lookup criteria field

            Hello Jerry and Brian,

            Is it correct that we want to hide conditional fields (the complete row) by specifying it in UIF via the hidden property instead of the Lookupable class? Also is my assumption correct that the current collection doesn’t support hidden rows either and the lib/grid.ftl needs to be altered to support this?

            Background info: https://jira.kuali.org/browse/KULRICE-9072

            Thanks,
            Claus

            From: Jerry Neal
            Sent: Monday, March 04, 2013 2:02 PM
            To: Claus Niesen
            Subject: RE: Conditionally render lookup criteria field

            Hi Claus,

            The functionality is covered by hidden or progressiveRender. The issue you are seeing is because the table row is still rendered (and the styling). I believe Brian has looked at this before.

            Probably the best thing for us to do when hiding the field (label and control) is check if those are the only two cells in the row and if so hide the row as well. This would be an option for the general framework, nothing specific to the lookup view. This would need to happen in script (where we do the progressive render), and in the template (for the hidden case). Might be a little tricky in the template because you will need to look ahead and determine if all the fields for a row are hidden, but the row is determined on the fly based on cell spans and the column count.

            Hope that helps.

            Jerry

            From: Claus Niesen
            Sent: Monday, March 04, 2013 6:13 PM
            To: Jerry Neal; Brian Smith
            Subject: RE: Conditionally render lookup criteria field

            Sounds like this is a known issue in collections as well. Is there a Jira for it and is/will someone work on it?

            From: Jerry Neal
            Sent: Monday, March 04, 2013 5:45 PM
            To: Claus Niesen; Brian Smith
            Subject: RE: Conditionally render lookup criteria field

            I am not sure. There are so many Jiras hard to know what all is out there. If you don’t mind, go ahead and add one and we can do it through maintenance.

            Thanks,
            Jerry

            KULRICE-9171 created in response

            Show
            cniesen Claus Niesen added a comment - - edited Email Communication From: Claus Niesen Sent: Monday, March 04, 2013 2:52 PM To: Jerry Neal; Brian Smith Subject: Conditionally render lookup criteria field Hello Jerry and Brian, Is it correct that we want to hide conditional fields (the complete row) by specifying it in UIF via the hidden property instead of the Lookupable class? Also is my assumption correct that the current collection doesn’t support hidden rows either and the lib/grid.ftl needs to be altered to support this? Background info: https://jira.kuali.org/browse/KULRICE-9072 Thanks, Claus From: Jerry Neal Sent: Monday, March 04, 2013 2:02 PM To: Claus Niesen Subject: RE: Conditionally render lookup criteria field Hi Claus, The functionality is covered by hidden or progressiveRender. The issue you are seeing is because the table row is still rendered (and the styling). I believe Brian has looked at this before. Probably the best thing for us to do when hiding the field (label and control) is check if those are the only two cells in the row and if so hide the row as well. This would be an option for the general framework, nothing specific to the lookup view. This would need to happen in script (where we do the progressive render), and in the template (for the hidden case). Might be a little tricky in the template because you will need to look ahead and determine if all the fields for a row are hidden, but the row is determined on the fly based on cell spans and the column count. Hope that helps. Jerry From: Claus Niesen Sent: Monday, March 04, 2013 6:13 PM To: Jerry Neal; Brian Smith Subject: RE: Conditionally render lookup criteria field Sounds like this is a known issue in collections as well. Is there a Jira for it and is/will someone work on it? From: Jerry Neal Sent: Monday, March 04, 2013 5:45 PM To: Claus Niesen; Brian Smith Subject: RE: Conditionally render lookup criteria field I am not sure. There are so many Jiras hard to know what all is out there. If you don’t mind, go ahead and add one and we can do it through maintenance. Thanks, Jerry KULRICE-9171 created in response
            Hide
            cniesen Claus Niesen added a comment -

            With KULRICE-9171 we can now conditionally render lookup criteria fields (using the render property on Uif-LookupCriteriaInputField).

            Show
            cniesen Claus Niesen added a comment - With KULRICE-9171 we can now conditionally render lookup criteria fields (using the render property on Uif-LookupCriteriaInputField).

              People

              • Assignee:
                cniesen Claus Niesen
                Reporter:
                cniesen Claus Niesen
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: