primefaces: DatePicker: PartialResponseError submitting multiple values
Here is a test case:
pf-4470.zip
Run the sample and then select a few dates from the multiple Calendar and press the “All” button.
You will get this stack trace:
Jan 24, 2019 7:41:10 AM com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException
SEVERE: Error Rendering View[/test.xhtml]
javax.faces.FacesException: Value could be either String or java.util.Date
at org.primefaces.util.CalendarUtils.getValueAsString(CalendarUtils.java:136)
at org.primefaces.util.CalendarUtils.getValueAsString(CalendarUtils.java:55)
at org.primefaces.component.calendar.BaseCalendarRenderer.encodeEnd(BaseCalendarRenderer.java:58)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:583)
at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
at javax.faces.component.UIForm.visitTree(UIForm.java:381)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (19 by maintainers)
Commits related to this issue
- Refactor #4471 — committed to primefaces/primefaces by mertsincan 5 years ago
@GedMarc I had to fix this in your code to be bean compliant like this…
You were returning testView instead of a void method.
Then for this bug, this is complete
Thanks guys! See you on the next issue thread!
Thanks a lot, @melloware 😉 Original issue is fixed now. Could @melloware and @GedMarc please test it?
@mertsincan I have confirmed the JS error is no longer displaying if immediate=“false” in this scenario.
On value setting also found encodeEnd() didn’t handle properly for no value selected with immediate=true, had to wrap.