org.zkoss.zel.ELException: Error reading 'value' on type org.zkoss.zul.Textbox

ZK-Tracker | dennis | 5 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    {code:none} org.zkoss.zel.ELException: Error reading 'value' on type org.zkoss.zul.Textbox at org.zkoss.zel.BeanELResolver.getValue(BeanELResolver.java:93) at org.zkoss.zel.CompositeELResolver.getValue(CompositeELResolver.java:67) at org.zkoss.zel.CompositeELResolver.getValue(CompositeELResolver.java:67) at org.zkoss.xel.zel.XelELResolver.getValue(XelELResolver.java:71) at org.zkoss.bind.xel.zel.BindELResolver.getValue(BindELResolver.java:64) at org.zkoss.zel.impl.parser.AstValue.getValue(AstValue.java:179) at org.zkoss.zel.impl.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189) at org.zkoss.xel.zel.ELXelExpression.evaluate(ELXelExpression.java:40) at org.zkoss.bind.impl.BindEvaluatorXImpl.getValue(BindEvaluatorXImpl.java:44) at org.zkoss.bind.impl.SavePropertyBindingImpl.getComponentValue(SavePropertyBindingImpl.java:97) at org.zkoss.bind.impl.SavePropertyBindingImpl.getValidate(SavePropertyBindingImpl.java:139) at org.zkoss.bind.impl.ValidationHelper.collectSavePropertyBinding(ValidationHelper.java:184) at org.zkoss.bind.impl.ValidationHelper.collectSaveFormBinding(ValidationHelper.java:195) at org.zkoss.bind.impl.ValidationHelper.collectSaveFormAfter(ValidationHelper.java:110) at org.zkoss.bind.impl.ValidationHelper.collectSaveAfter(ValidationHelper.java:91) at org.zkoss.bind.impl.BinderImpl.doValidate(BinderImpl.java:1440) at org.zkoss.bind.impl.BinderImpl.doCommand(BinderImpl.java:1257) at org.zkoss.bind.impl.BinderImpl.access$7(BinderImpl.java:1245) at org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent(BinderImpl.java:1148) at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2741) at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2712) at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2653) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1699) at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1484) at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1201) at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:558) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:456) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:464) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) Caused by: org.zkoss.zk.ui.WrongValueException: the name have to equals to Lin, but is A at org.zkoss.zul.impl.InputElement.checkUserError(InputElement.java:655) at org.zkoss.zul.impl.InputElement.getText(InputElement.java:248) at org.zkoss.zul.Textbox.getValue(Textbox.java:47) at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.zkoss.zel.BeanELResolver.getValue(BeanELResolver.java:87) ... 45 more {code} 1.type A in textbox click save, you will see wrong message 'the name have to equals to Lin, but is A' 2.type B in textbox click save, you will see exception showing in console if you wrap BinderImpl.this.doCommand and print the cached exception. {code:xml} <window apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('org.zkoss.zktest.bind.issue.Bx')" validationMessages="@id('vmsgs')"> <vlayout> <hlayout> <label value="@bind(vm.name)" /> </hlayout> <hlayout form="@id('fx') @load(vm) @save(vm, after='save2') @validator(vm.validator1)" > Name : <textbox id="tb2" value="@bind(fx.name)" errorMessage="@load(vmsgs[self.parent])" /> </hlayout> <button label="save2" onClick="@command('save2')"/> </vlayout> </window> {code} {code:java} public class Bx { String name; public Bx() { } public String getName() { return name; } public void setName(String name) { this.name = name; } @Command public void save1(){ } @Command public void save2(){ } public Validator getValidator1(){ return new AbstractValidator() { @Override public void validate(ValidationContext ctx) { String name = (String)ctx.getProperties("name")[0].getValue(); if(!"Lin".equals(name)){ addInvalidMessage(ctx, "the name have to equals to Lin, but is "+name); } } }; } } {code}

    ZK-Tracker | 5 years ago | dennis
    org.zkoss.zel.ELException: Error reading 'value' on type org.zkoss.zul.Textbox
  2. 0

    {code:none} org.zkoss.zel.ELException: Error reading 'value' on type org.zkoss.zul.Textbox at org.zkoss.zel.BeanELResolver.getValue(BeanELResolver.java:93) at org.zkoss.zel.CompositeELResolver.getValue(CompositeELResolver.java:67) at org.zkoss.zel.CompositeELResolver.getValue(CompositeELResolver.java:67) at org.zkoss.xel.zel.XelELResolver.getValue(XelELResolver.java:71) at org.zkoss.bind.xel.zel.BindELResolver.getValue(BindELResolver.java:64) at org.zkoss.zel.impl.parser.AstValue.getValue(AstValue.java:179) at org.zkoss.zel.impl.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189) at org.zkoss.xel.zel.ELXelExpression.evaluate(ELXelExpression.java:40) at org.zkoss.bind.impl.BindEvaluatorXImpl.getValue(BindEvaluatorXImpl.java:44) at org.zkoss.bind.impl.SavePropertyBindingImpl.getComponentValue(SavePropertyBindingImpl.java:97) at org.zkoss.bind.impl.SavePropertyBindingImpl.getValidate(SavePropertyBindingImpl.java:139) at org.zkoss.bind.impl.ValidationHelper.collectSavePropertyBinding(ValidationHelper.java:184) at org.zkoss.bind.impl.ValidationHelper.collectSaveFormBinding(ValidationHelper.java:195) at org.zkoss.bind.impl.ValidationHelper.collectSaveFormAfter(ValidationHelper.java:110) at org.zkoss.bind.impl.ValidationHelper.collectSaveAfter(ValidationHelper.java:91) at org.zkoss.bind.impl.BinderImpl.doValidate(BinderImpl.java:1440) at org.zkoss.bind.impl.BinderImpl.doCommand(BinderImpl.java:1257) at org.zkoss.bind.impl.BinderImpl.access$7(BinderImpl.java:1245) at org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent(BinderImpl.java:1148) at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2741) at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2712) at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2653) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1699) at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1484) at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1201) at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:558) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:456) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:464) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) Caused by: org.zkoss.zk.ui.WrongValueException: the name have to equals to Lin, but is A at org.zkoss.zul.impl.InputElement.checkUserError(InputElement.java:655) at org.zkoss.zul.impl.InputElement.getText(InputElement.java:248) at org.zkoss.zul.Textbox.getValue(Textbox.java:47) at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.zkoss.zel.BeanELResolver.getValue(BeanELResolver.java:87) ... 45 more {code} 1.type A in textbox click save, you will see wrong message 'the name have to equals to Lin, but is A' 2.type B in textbox click save, you will see exception showing in console if you wrap BinderImpl.this.doCommand and print the cached exception. {code:xml} <window apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('org.zkoss.zktest.bind.issue.Bx')" validationMessages="@id('vmsgs')"> <vlayout> <hlayout> <label value="@bind(vm.name)" /> </hlayout> <hlayout form="@id('fx') @load(vm) @save(vm, after='save2') @validator(vm.validator1)" > Name : <textbox id="tb2" value="@bind(fx.name)" errorMessage="@load(vmsgs[self.parent])" /> </hlayout> <button label="save2" onClick="@command('save2')"/> </vlayout> </window> {code} {code:java} public class Bx { String name; public Bx() { } public String getName() { return name; } public void setName(String name) { this.name = name; } @Command public void save1(){ } @Command public void save2(){ } public Validator getValidator1(){ return new AbstractValidator() { @Override public void validate(ValidationContext ctx) { String name = (String)ctx.getProperties("name")[0].getValue(); if(!"Lin".equals(name)){ addInvalidMessage(ctx, "the name have to equals to Lin, but is "+name); } } }; } } {code}

    ZK-Tracker | 5 years ago | dennis
    org.zkoss.zel.ELException: Error reading 'value' on type org.zkoss.zul.Textbox

    Root Cause Analysis

    1. org.zkoss.zk.ui.WrongValueException

      the name have to equals to Lin, but is A

      at org.zkoss.zul.impl.InputElement.checkUserError()
    2. ZK XUL Components
      Textbox.getValue
      1. org.zkoss.zul.impl.InputElement.checkUserError(InputElement.java:655)
      2. org.zkoss.zul.impl.InputElement.getText(InputElement.java:248)
      3. org.zkoss.zul.Textbox.getValue(Textbox.java:47)
      3 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    4. The ZK EL Library
      CompositeELResolver.getValue
      1. org.zkoss.zel.BeanELResolver.getValue(BeanELResolver.java:87)
      2. org.zkoss.zel.CompositeELResolver.getValue(CompositeELResolver.java:67)
      3. org.zkoss.zel.CompositeELResolver.getValue(CompositeELResolver.java:67)
      3 frames
    5. The ZKoss Common Library
      XelELResolver.getValue
      1. org.zkoss.xel.zel.XelELResolver.getValue(XelELResolver.java:71)
      1 frame
    6. ZK Bind
      BindELResolver.getValue
      1. org.zkoss.bind.xel.zel.BindELResolver.getValue(BindELResolver.java:64)
      1 frame
    7. The ZK EL Library
      ValueExpressionImpl.getValue
      1. org.zkoss.zel.impl.parser.AstValue.getValue(AstValue.java:179)
      2. org.zkoss.zel.impl.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)
      2 frames
    8. The ZKoss Common Library
      ELXelExpression.evaluate
      1. org.zkoss.xel.zel.ELXelExpression.evaluate(ELXelExpression.java:40)
      1 frame
    9. ZK Bind
      BinderImpl$CommandEventListener.onEvent
      1. org.zkoss.bind.impl.BindEvaluatorXImpl.getValue(BindEvaluatorXImpl.java:44)
      2. org.zkoss.bind.impl.SavePropertyBindingImpl.getComponentValue(SavePropertyBindingImpl.java:97)
      3. org.zkoss.bind.impl.SavePropertyBindingImpl.getValidate(SavePropertyBindingImpl.java:139)
      4. org.zkoss.bind.impl.ValidationHelper.collectSavePropertyBinding(ValidationHelper.java:184)
      5. org.zkoss.bind.impl.ValidationHelper.collectSaveFormBinding(ValidationHelper.java:195)
      6. org.zkoss.bind.impl.ValidationHelper.collectSaveFormAfter(ValidationHelper.java:110)
      7. org.zkoss.bind.impl.ValidationHelper.collectSaveAfter(ValidationHelper.java:91)
      8. org.zkoss.bind.impl.BinderImpl.doValidate(BinderImpl.java:1440)
      9. org.zkoss.bind.impl.BinderImpl.doCommand(BinderImpl.java:1257)
      10. org.zkoss.bind.impl.BinderImpl.access$7(BinderImpl.java:1245)
      11. org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent(BinderImpl.java:1148)
      11 frames
    10. ZK Kernel
      DHtmlUpdateServlet.doPost
      1. org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2741)
      2. org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2712)
      3. org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2653)
      4. org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136)
      5. org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1699)
      6. org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1484)
      7. org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1201)
      8. org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:558)
      9. org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:456)
      10. org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:464)
      10 frames
    11. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      2 frames
    12. Jetty Server
      SelectChannelEndPoint.run
      1. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      2. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
      3. org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      4. org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      5. org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
      6. org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
      7. org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      8. org.mortbay.jetty.Server.handle(Server.java:326)
      9. org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      10. org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
      11. org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
      12. org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
      13. org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      14. org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
      14 frames
    13. Jetty Util
      QueuedThreadPool$PoolThread.run
      1. org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      1 frame