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

ListELResolver - NumberFormatException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Critical Critical
    • None
    • 6.5.1
    • Databind 2

      We have custom implementation for ListModel witch also implement List interface. But when I try to access property (in ZUL) I get:

      java.lang.NumberFormatException: For input string: "myProperty"
      	at java.lang.NumberFormatException.forInputString(Unknown Source)
      	at java.lang.Integer.parseInt(Unknown Source)
      	at java.lang.Integer.parseInt(Unknown Source)
      	at org.zkoss.zel.ListELResolver.coerce(ListELResolver.java:173)
      	at org.zkoss.zel.ListELResolver.getValue(ListELResolver.java:52)
      	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:72)
      	at org.zkoss.bind.xel.zel.BindELResolver.getValue(BindELResolver.java:76)
      	at org.zkoss.zel.impl.parser.AstValue.getValue(AstValue.java:177)
      	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:43)
      	at org.zkoss.bind.impl.LoadPropertyBindingImpl.load(LoadPropertyBindingImpl.java:58)
      	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:1839)
      	at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1816)
      	at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1819)
      	at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1819)
      	at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1819)
      	at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1819)
      	at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1819)
      	at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1819)
      	at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1819)
      	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)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.doAfterCompose(UiEngineImpl.java:530)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:825)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:771)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:680)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:644)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:394)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:316)
      	at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:214)
      	at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:135)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
      	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      

      Solution is similar to https://github.com/zkoss/zk/blob/master/zkbind/src/org/zkoss/bind/xel/zel/ListModelELResolver.java#L131 (ListELResolver: https://github.com/zkoss/zk/blob/master/zel/src/org/zkoss/zel/ListELResolver.java#L172)

            Unassigned Unassigned
            sbglobesy sbglobesy
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: