org.zkoss.zel.ELException

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.

  • {code:xml} <zk> <window apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('issues.TestModel')"> <listbox model="@bind(vm.selBox)" mold="select" selectedIndex="@bind(vm.selIndex)"> <template name="model" var="item"> <listitem label="@bind(item)"/> </template> </listbox> <intbox value="@bind(vm.selIndex)" /> </window> </zk> {code} {code:java} public class TestModel { int selIndex; ListModelList<String> selBox; public TestModel(){ selIndex = 0; selBox = new ListModelList<String>(); selBox.add("A"); selBox.add("B"); selBox.add("C"); selBox.add("D"); selBox.add("E"); } public int getSelIndex() { return selIndex; } @NotifyChange public void setSelIndex(int selIndex) { this.selIndex = selIndex; } public ListModelList<String> getSelBox() { return selBox; } } {code} will get {code:none} org.zkoss.zel.ELException: Error writing 'selectedIndex' on type org.zkoss.zul.Listbox at org.zkoss.zel.BeanELResolver.setValue(BeanELResolver.java:142) at org.zkoss.zel.CompositeELResolver.setValue(CompositeELResolver.java:83) at org.zkoss.zel.CompositeELResolver.setValue(CompositeELResolver.java:83) at org.zkoss.xel.zel.XelELResolver.setValue(XelELResolver.java:110) at org.zkoss.bind.xel.zel.BindELResolver.setValue(BindELResolver.java:68) at org.zkoss.zel.impl.parser.AstValue.setValue(AstValue.java:215) at org.zkoss.zel.impl.ValueExpressionImpl.setValue(ValueExpressionImpl.java:256) at org.zkoss.xel.zel.ELXelExpression.setValue(ELXelExpression.java:50) at org.zkoss.bind.impl.BindEvaluatorXImpl.setValue(BindEvaluatorXImpl.java:48) at org.zkoss.bind.impl.LoadPropertyBindingImpl.load(LoadPropertyBindingImpl.java:64) at org.zkoss.bind.impl.PropertyBindingHelper.loadComponentProperties(PropertyBindingHelper.java:350) at org.zkoss.bind.impl.BinderImpl.loadComponentProperties(BinderImpl.java:1439) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1423) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1425) at org.zkoss.bind.BindComposer.doAfterCompose(BindComposer.java:105) {code}
    via by dennis,
  • {code:xml} <zk> <window apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('issues.TestModel')"> <listbox model="@bind(vm.selBox)" mold="select" selectedIndex="@bind(vm.selIndex)"> <template name="model" var="item"> <listitem label="@bind(item)"/> </template> </listbox> <intbox value="@bind(vm.selIndex)" /> </window> </zk> {code} {code:java} public class TestModel { int selIndex; ListModelList<String> selBox; public TestModel(){ selIndex = 0; selBox = new ListModelList<String>(); selBox.add("A"); selBox.add("B"); selBox.add("C"); selBox.add("D"); selBox.add("E"); } public int getSelIndex() { return selIndex; } @NotifyChange public void setSelIndex(int selIndex) { this.selIndex = selIndex; } public ListModelList<String> getSelBox() { return selBox; } } {code} will get {code:none} org.zkoss.zel.ELException: Error writing 'selectedIndex' on type org.zkoss.zul.Listbox at org.zkoss.zel.BeanELResolver.setValue(BeanELResolver.java:142) at org.zkoss.zel.CompositeELResolver.setValue(CompositeELResolver.java:83) at org.zkoss.zel.CompositeELResolver.setValue(CompositeELResolver.java:83) at org.zkoss.xel.zel.XelELResolver.setValue(XelELResolver.java:110) at org.zkoss.bind.xel.zel.BindELResolver.setValue(BindELResolver.java:68) at org.zkoss.zel.impl.parser.AstValue.setValue(AstValue.java:215) at org.zkoss.zel.impl.ValueExpressionImpl.setValue(ValueExpressionImpl.java:256) at org.zkoss.xel.zel.ELXelExpression.setValue(ELXelExpression.java:50) at org.zkoss.bind.impl.BindEvaluatorXImpl.setValue(BindEvaluatorXImpl.java:48) at org.zkoss.bind.impl.LoadPropertyBindingImpl.load(LoadPropertyBindingImpl.java:64) at org.zkoss.bind.impl.PropertyBindingHelper.loadComponentProperties(PropertyBindingHelper.java:350) at org.zkoss.bind.impl.BinderImpl.loadComponentProperties(BinderImpl.java:1439) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1423) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1425) at org.zkoss.bind.BindComposer.doAfterCompose(BindComposer.java:105) {code}
    via by dennis,
    • org.zkoss.zel.ELException: Error writing 'selectedIndex' on type org.zkoss.zul.Listbox at org.zkoss.zel.BeanELResolver.setValue(BeanELResolver.java:142) at org.zkoss.zel.CompositeELResolver.setValue(CompositeELResolver.java:83) at org.zkoss.zel.CompositeELResolver.setValue(CompositeELResolver.java:83) at org.zkoss.xel.zel.XelELResolver.setValue(XelELResolver.java:110) at org.zkoss.bind.xel.zel.BindELResolver.setValue(BindELResolver.java:68) at org.zkoss.zel.impl.parser.AstValue.setValue(AstValue.java:215) at org.zkoss.zel.impl.ValueExpressionImpl.setValue(ValueExpressionImpl.java:256) at org.zkoss.xel.zel.ELXelExpression.setValue(ELXelExpression.java:50) at org.zkoss.bind.impl.BindEvaluatorXImpl.setValue(BindEvaluatorXImpl.java:48) at org.zkoss.bind.impl.LoadPropertyBindingImpl.load(LoadPropertyBindingImpl.java:64) at org.zkoss.bind.impl.PropertyBindingHelper.loadComponentProperties(PropertyBindingHelper.java:350) at org.zkoss.bind.impl.BinderImpl.loadComponentProperties(BinderImpl.java:1439) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1423) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1425) at org.zkoss.bind.BindComposer.doAfterCompose(BindComposer.java:105)
    No Bugmate found.