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

Default value property of DataField should have type of Object

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-10631Object Property Utils should consider persistence metadata when getting property type
      KULRICE-12801Having issues while using property "renderAddBlankLineButton" with version Rice version 2.3.2
      KULRICE-13082Make sortAs on DataField less strict to allow for custom sorts
      KULRICE-5879Radiobuttons for Rule and Action subtypes should have a default selected.
      KULRICE-7589applyDefaultCellWidths property on table layout manager is not working properly
      KULRICE-13294Inconsistency in KRMS lookup default value maintenance link render/hide property
      KULRICE-12038KRAD Sample App Library Datafield default value isn't being populated correctly.
      KULRICE-7857ROLE_NAME property in KimConstants seems to have the wrong value
      KULRICE-7923Use message for readonly values of Input and DataField to allow processing of rich message content (if they contain any)
      KULRICE-6286Create HTML lists from simple String list property values
    • Rice Module:
      KRAD
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      Currently the defaultValue property of DataField is type String. This prevents setting default values for properties other than string (like Date) through expressions. The type should be changed to Object

        Issue Links

          Activity

          Hide
          Daniel Seibert (Inactive) added a comment -

          My 2 cents after looking attempting to set a defaultValue for a date:

          I see two quick, easy solutions:
          1. In ViewHelperServiceImpl.populateDefaultValueForField(). Check the dataField for a propertyEditor assigned. If so, use it. If not, use ObjectPropertReference.setPropertyValue() to handle the primitive type cases. (In this case, in the maintenance view definition, assigned p:propertyEditorClass="org.kuali.rice.krad.web.bind.UifDateEditor" )

          2. In ObjectPropertyReference.setPropertyValue(), add logic to handle dates with UifDateEditor in addition to the primitive types.

          Show
          Daniel Seibert (Inactive) added a comment - My 2 cents after looking attempting to set a defaultValue for a date: I see two quick, easy solutions: 1. In ViewHelperServiceImpl.populateDefaultValueForField(). Check the dataField for a propertyEditor assigned. If so, use it. If not, use ObjectPropertReference.setPropertyValue() to handle the primitive type cases. (In this case, in the maintenance view definition, assigned p:propertyEditorClass="org.kuali.rice.krad.web.bind.UifDateEditor" ) 2. In ObjectPropertyReference.setPropertyValue(), add logic to handle dates with UifDateEditor in addition to the primitive types.
          Hide
          Daniel Seibert (Inactive) added a comment -

          On changing type of defaultValue property from String to Object:
          1. some existing code is expecting a String using StringUtils to check for empty and notEmpty
          2. If using Spring EL to specify a date, you still need a String to Date conversion.

          Show
          Daniel Seibert (Inactive) added a comment - On changing type of defaultValue property from String to Object: 1. some existing code is expecting a String using StringUtils to check for empty and notEmpty 2. If using Spring EL to specify a date, you still need a String to Date conversion.

            People

            • Assignee:
              Daniel Seibert (Inactive)
              Reporter:
              Jerry Neal (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day
                1d

                  Structure Helper Panel