Details
-
Type:
Bug Fix
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.4
-
Component/s: Development
-
Security Level: Public (Public: Anyone can view)
-
Labels:None
-
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
Attachments
Issue Links
- cloned from
-
KULRICE-7208 Template
-
- Closed
-
- cloned to
-
KULRICE-8713 Use of method with field attribute query causes doesn't work due to method arguments not getting sent by script
-
- Closed
-
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.