Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
14.10.3
-
None
-
Unknown
-
Description
Obviously the default displayer associated to macro parameters of type Date (the Date Picker) is not compatible with the Date converter für the parameter.
When I have set the type java.util.Date in the object WikiMacroParameterClass giving the parameter-name “someDate”, I observe the following: I can fill in the field of someDate in the macro form with the Date Picker working. But after saving the form in the code of the macro the reference $wikimacro.parameters.someDate doesn't have any value. It's just null.
You can test it with the following Velocity-code in a macro, where the conversion is working with the described setting for the parameter someDate, though only with String as an intermediate type and through another binding ($wikimakro.context or $xcontext), while wikimacro.parameters.someDate is empty.
#set($valueAsDate = $datetool.toDate('yyyy/MM/dd H:m',"$!wikimacro.context.getCurrentMacroBlock().getParameter('someDate')"))
someDate after conversion: $valueAsDate
#if ("$!wikimacro.parameters.someDate" == '')
Parameter someDate ist empty!
#else
Parameter somedate has the value $!wikimacro.parameters.someDate
#end
Could it have to do with the issue 14894?