Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-837

ClassCastException while parsing Date when TimeZone + Custom Constraint are active

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 5.0.11
    • 5.0.10, 6.0.0
    • Components
    • None

      I have created a sample for this one: http://zkfiddle.org/sample/2oemgav/4-Custom-Constraint-and-TimeZone-Problem

      I have a datebox for which i set a custom constraint and a timezone. When i try to enter an invalid date (e.g. 92.02.2012), a ClassCastException occurs:
      java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Date
      at org.zkoss.zul.Datebox.unmarshall(Datebox.java:764)
      at org.zkoss.zul.impl.InputElement.service(InputElement.java:714)
      at org.zkoss.zul.Datebox.service(Datebox.java:724)
      at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:689)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1123)
      at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:562)
      at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:457)
      at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:465)
      ...

      This seems to be working in ZK 5.0.9.

            TonyQ TonyQ
            cypha cypha
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: