Details

    • Type: Task Task
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-5377Develop utility class that will apply formatting using the spring property editors
      KULRICE-9240UifBooleanEditor Property Editor formatted string values
      KULRICE-9640ReferenceLinker.linkObjectsWithCircularReferenceCheck in krad-data needs to handle formatting when setting the property value
      KULRICE-6853Currency Format exception on Null values
      KULRICE-13144IT Failure UifServletRequestDataBinderIntegrationTest Value of nested property 'document.newMaintainableObject.dataObject.altCoordinator1' is null
      KULRICE-13617Create AFT for the dd property preserveLockingKeysonCopy
      KULRICE-6437Add ability to use #node on client-bound properties like progressiveRender and refreshWhenChanged
      KULRICE-13805Create smoke test for ability to indicate that any property which is the code on a relationship for a BO class which implements KualiCode should display itself as a combination of Code + Name.
      KULRICE-11510Maintenance Conversion Script - documentAuthorizerClass property
      KULRICE-9326After reload of dictionary onDocumentReadyScript property fails to overwrite inherited value
    • Rice Module:
      KRAD
    • Sprint:
      Core 2.5.0-m4 Sprint 2
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      When populating lookup parameters, the KNS would run the passed values through formatters. We need the ability to apply property editors through code in KRAD. This is a TODO in many places (there is also a more global jira somewhere). KNS code can be found in org.kuali.rice.krad.lookup.LookupUtils#retrieveLookupParameterValue

        Issue Links

          Activity

          Hide
          Jerry Neal (Inactive) added a comment -

          These should also be applied by default values (when the lookup clear occurs). Jira need formatting (property editor) on default value reset (org.kuali.rice.krad.lookup.LookupableImpl#performClear)

          Show
          Jerry Neal (Inactive) added a comment - These should also be applied by default values (when the lookup clear occurs). Jira need formatting (property editor) on default value reset (org.kuali.rice.krad.lookup.LookupableImpl#performClear)
          Hide
          Kristina Taylor (Inactive) added a comment -

          From Jerry:

          There are several places in code, where we get a value for a property (using ObjectPropertyUtils) and use that value to set something that will be displayed. If a property editor is configured for a field or datatype, the editor should be applied for the display. Some examples include getting the value for the inquiry link text and terms in expressions. Currently, ObjectPropertyUtils uses a different BeanWrapper than the web binder (UifViewBeanWrapper). All the property editors are registered with the UifViewBeanWrapper, so when we use ObjectPropertyUtils they do not get applied. Recently however, work was done with the registration of property editors that will help with this. What we need is a getFormattedPropertyValue method on ObjectPropertyUtils that will get the value of the property, and apply any registered property editors. Then we need to find where we need the formatted value and change the call (there are todos in the code where this needs to be done).

          Show
          Kristina Taylor (Inactive) added a comment - From Jerry: There are several places in code, where we get a value for a property (using ObjectPropertyUtils) and use that value to set something that will be displayed. If a property editor is configured for a field or datatype, the editor should be applied for the display. Some examples include getting the value for the inquiry link text and terms in expressions. Currently, ObjectPropertyUtils uses a different BeanWrapper than the web binder (UifViewBeanWrapper). All the property editors are registered with the UifViewBeanWrapper, so when we use ObjectPropertyUtils they do not get applied. Recently however, work was done with the registration of property editors that will help with this. What we need is a getFormattedPropertyValue method on ObjectPropertyUtils that will get the value of the property, and apply any registered property editors. Then we need to find where we need the formatted value and change the call (there are todos in the code where this needs to be done).
          Hide
          Kristina Taylor (Inactive) added a comment -

          I found possible TODOs in LookupUtils.retrieveLookupParameterValue, LightTable.handleDataFieldInRow, and ScriptUtils.translateValue but there could be more. Jerry, can you think of any more places?

          Show
          Kristina Taylor (Inactive) added a comment - I found possible TODOs in LookupUtils.retrieveLookupParameterValue , LightTable.handleDataFieldInRow , and ScriptUtils.translateValue but there could be more. Jerry, can you think of any more places?
          Hide
          Kristina Taylor (Inactive) added a comment -

          We already have a method for getting the property editors. We should use that. It is

          ObjectPropertyUtils.getPropertyValueAsText(dataObject, propertyName);
          
          Show
          Kristina Taylor (Inactive) added a comment - We already have a method for getting the property editors. We should use that. It is ObjectPropertyUtils.getPropertyValueAsText(dataObject, propertyName);
          Hide
          Shannon Hess added a comment -

          I made changes to the following classes/methods:

          • In ScriptUtils.translateValue - Since the section where the TODO was placed was for simple classes, I didn't see that going through a property editor was needed. However, just below that was a section for data objects, which I did think needed to go through property editors.
          • LookupUtils.retrieveLookupParameterValue
          • LightTable.processExpression
          • LightTable.handleDataFieldInRow
          • KRADUtils.getSimpleFieldValue
          • KradUtils.generateUniqueViewTitle
          • Inquiry.buildInquiryLink
          • AttributeQueryServiceImpl.performFieldQuery
          • AttributeQueryServiceImpl.handleLocationSuggestProperties
          • AttributeQueryServiceImpl.handleAdditionalSuggestProperties
          • AttributeQueryServiceImpl.retrievePropertiesOnResults

          NOTE - KradUtils.getPropertyKeyValuesFromDataObject had already been updated to use getPropertyValueAsText

          Example custom property editor - http://localhost:8080/krad-dev/kr-krad/uicomponents?viewId=UifCompView&methodToCall=start&pageId=UifCompView-Page10

          Show
          Shannon Hess added a comment - I made changes to the following classes/methods: In ScriptUtils.translateValue - Since the section where the TODO was placed was for simple classes, I didn't see that going through a property editor was needed. However, just below that was a section for data objects, which I did think needed to go through property editors. LookupUtils.retrieveLookupParameterValue LightTable.processExpression LightTable.handleDataFieldInRow KRADUtils.getSimpleFieldValue KradUtils.generateUniqueViewTitle Inquiry.buildInquiryLink AttributeQueryServiceImpl.performFieldQuery AttributeQueryServiceImpl.handleLocationSuggestProperties AttributeQueryServiceImpl.handleAdditionalSuggestProperties AttributeQueryServiceImpl.retrievePropertiesOnResults NOTE - KradUtils.getPropertyKeyValuesFromDataObject had already been updated to use getPropertyValueAsText Example custom property editor - http://localhost:8080/krad-dev/kr-krad/uicomponents?viewId=UifCompView&methodToCall=start&pageId=UifCompView-Page10

            People

            • Assignee:
              Shannon Hess
              Reporter:
              Jerry Neal (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 3 days
                3d
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 1 hour Time Not Required
                1d 1h

                  Agile

                    Structure Helper Panel