-
Bug
-
Resolution: Obsolete
-
Neutral
-
None
-
6.2.1
-
None
If I use a Slider field in a content app and define a content type for this content, I get an error if I set the content-type type as Double and also if I use the default configuration.
Steps to reproduce
- Create a content app and the content-type definition(yaml files attached):
App definition
!content-type:news name: News 2 subApps: detail: form: properties: !override jcrName: order: $type: sliderField defaultValue: 50
Content type definitiondatasource: workspace: news rootPath: / autoCreate: true model: nodeType: mgnl:news properties: - name: order - type: Double
- Open the new content app and try to change the slider. And error comes up.
Expected result
Slider is working and the value can be changed and saved
Actual result
An error comes up:
Message: java.lang.String cannot be cast to java.lang.Double. Stack trace: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Double
Workaround
- do not specify the type in the content type definition, just to use the default one.
- add property type: java.lang.Double in the slider field definition
Development notes
JCR form binding mechanism should do auto-conversion for the primitive types, but it seems not happening in this case.
Acceptance criteria