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

Automatic String->Enum coercion

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 6.0.1
    • None
    • None

      org.zkoss.lang.Classes.coerce(Class<?> cls, Object val) does no coercion from Strings to Enums and throws an exception:
      java.lang.ClassCastException: class java.lang.String cannot be converted to class my.EnumType.
      at org.zkoss.lang.Classes.coerce(Classes.java:1439)
      It would be great if it did.

      Right now the workaround/own implementation has been described here: http://www.zkoss.org/forum/listComment/8412

            Unassigned Unassigned
            hattifnat hattifnat
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: