java.lang.ClassCastException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • h3. Error Message: {quote} java.lang.ClassCastException: org.zkoss.reference.developer.mvvm.collection.model.Item at org.zkoss.bind.converter.sys.RadiogroupSelectedItemConverter.coerceToUi(RadiogroupSelectedItemConverter.java:59) at org.zkoss.bind.impl.LoadPropertyBindingImpl.load(LoadPropertyBindingImpl.java:74) at org.zkoss.bind.impl.PropertyBindingHandler.doLoadBinding(PropertyBindingHandler.java:171) at org.zkoss.bind.impl.PropertyBindingHandler.doLoad(PropertyBindingHandler.java:372) at org.zkoss.bind.impl.BinderImpl.loadComponentProperties(BinderImpl.java:1802) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1779) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1782) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1782) at org.zkoss.bind.BindComposer$BinderKeeper$Loader.load(BindComposer.java:468) at org.zkoss.bind.BindComposer$BinderKeeper.loadComponentForAllBinders(BindComposer.java:450) at org.zkoss.bind.BindComposer.doAfterCompose(BindComposer.java:174) {quote} h3. Reproducing Steps: 1. use the following code to reproduce the exception. {code:xml} <radiogroup selectedItem="@bind(vm.pickedItem)"> <vlayout children="@load(vm.itemList)"> <template name="children"> <radio label="@load(each)" value="@load(each)" /> </template> </vlayout> </radiogroup> {code} {{vm.pickedItem}} is an {{Item}} object. {{vm.itemList}} is {{List<Item>}} object. {code} public class Item { private String name; } {code} extracted from : https://zkbooks.googlecode.com/svn/trunk/devref/src/main/webapp/selection-radio.zul
    via by hawk,
  • h3. Error Message: {quote} java.lang.ClassCastException: org.zkoss.reference.developer.mvvm.collection.model.Item at org.zkoss.bind.converter.sys.RadiogroupSelectedItemConverter.coerceToUi(RadiogroupSelectedItemConverter.java:59) at org.zkoss.bind.impl.LoadPropertyBindingImpl.load(LoadPropertyBindingImpl.java:74) at org.zkoss.bind.impl.PropertyBindingHandler.doLoadBinding(PropertyBindingHandler.java:171) at org.zkoss.bind.impl.PropertyBindingHandler.doLoad(PropertyBindingHandler.java:372) at org.zkoss.bind.impl.BinderImpl.loadComponentProperties(BinderImpl.java:1802) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1779) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1782) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1782) at org.zkoss.bind.BindComposer$BinderKeeper$Loader.load(BindComposer.java:468) at org.zkoss.bind.BindComposer$BinderKeeper.loadComponentForAllBinders(BindComposer.java:450) at org.zkoss.bind.BindComposer.doAfterCompose(BindComposer.java:174) {quote} h3. Reproducing Steps: 1. use the following code to reproduce the exception. {code:xml} <radiogroup selectedItem="@bind(vm.pickedItem)"> <vlayout children="@load(vm.itemList)"> <template name="children"> <radio label="@load(each)" value="@load(each)" /> </template> </vlayout> </radiogroup> {code} {{vm.pickedItem}} is an {{Item}} object. {{vm.itemList}} is {{List<Item>}} object. {code} public class Item { private String name; } {code} extracted from : https://zkbooks.googlecode.com/svn/trunk/devref/src/main/webapp/selection-radio.zul
    via by hawk,
    • java.lang.ClassCastException: org.zkoss.reference.developer.mvvm.collection.model.Item at org.zkoss.bind.converter.sys.RadiogroupSelectedItemConverter.coerceToUi(RadiogroupSelectedItemConverter.java:59) at org.zkoss.bind.impl.LoadPropertyBindingImpl.load(LoadPropertyBindingImpl.java:74) at org.zkoss.bind.impl.PropertyBindingHandler.doLoadBinding(PropertyBindingHandler.java:171) at org.zkoss.bind.impl.PropertyBindingHandler.doLoad(PropertyBindingHandler.java:372) at org.zkoss.bind.impl.BinderImpl.loadComponentProperties(BinderImpl.java:1802) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1779) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1782) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1782) at org.zkoss.bind.BindComposer$BinderKeeper$Loader.load(BindComposer.java:468) at org.zkoss.bind.BindComposer$BinderKeeper.loadComponentForAllBinders(BindComposer.java:450) at org.zkoss.bind.BindComposer.doAfterCompose(BindComposer.java:174)
    No Bugmate found.