0

NullException while callOnDirtyChange

asked 2018-12-05 10:53:38 +0800

superium gravatar image superium
17 2

I'm working on a forum-like project. a little difference is each post has a opinion list.

<grid model="@load(vm.currentThread.postlist)" >

        <rows>
            <template name="model">
                <row form="@id('fx') @load(each) @save(each,after='doSave')">

                    <grid model="@load(fx.assert_list)" >

                                <rows>
                                    <template name="model" var="a">
                                        <row>
                                            <cell>
                                                <nodom>

                                                <label value="@load(aStatus.index+1)" />

                                                <label   value="@load(a.post)" />

                                                <textbox value="@save(a.comment,before='doSave')" />

                                                </nodom>
                    ......

in normal case,there's no problem. but when i manually added one post to postlist (when another user post,i call global command to clone an post and add to the postlist of every user who was read this thread), and if the user tried to change the fresh post (eg. give an comment), i got this Exception:

java.lang.NullPointerException
    at org.zkoss.bind.proxy.FormProxyHandler$3.call(FormProxyHandler.java:206)
    at org.zkoss.bind.proxy.ProxyHelper.callOnDirtyChange(ProxyHelper.java:300)
    at org.zkoss.bind.proxy.BeanProxyHandler.invoke(BeanProxyHandler.java:218)
    at myProject.beans.Asserts_$$_jvst67d_1.setScore(Asserts_$$_jvst67d_1.java)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.zkoss.zel.BeanELResolver.setValue(BeanELResolver.java:138)
    at org.zkoss.zel.CompositeELResolver.setValue(CompositeELResolver.java:125)
    at org.zkoss.zel.CompositeELResolver.setValue(CompositeELResolver.java:125)
    at org.zkoss.xel.zel.XelELResolver.setValue(XelELResolver.java:155)
    at org.zkoss.bind.xel.zel.BindELResolver.saveEqualBeans(BindELResolver.java:241)
    at org.zkoss.bind.xel.zel.BindELResolver.tieValue(BindELResolver.java:292)
    at org.zkoss.bind.xel.zel.BindELResolver.getValue(BindELResolver.java:154)
    at org.zkoss.zel.impl.parser.AstValue.getValue(AstValue.java:188)
    at org.zkoss.zel.impl.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184)
    at org.zkoss.xel.zel.ELXelExpression.evaluate(ELXelExpression.java:41)
    at org.zkoss.bind.impl.BindEvaluatorXImpl.getValue(BindEvaluatorXImpl.java:46)
    at org.zkoss.bind.impl.SavePropertyBindingImpl.getBasePropertyIfFromCollection(SavePropertyBindingImpl.java:317)
    at org.zkoss.bind.impl.ValidationHelper.collectSavePropertyBinding(ValidationHelper.java:202)
    at org.zkoss.bind.impl.ValidationHelper.collectSaveFormBinding(ValidationHelper.java:238)
    at org.zkoss.bind.impl.ValidationHelper.collectSaveFormAfter(ValidationHelper.java:116)
    at org.zkoss.bind.impl.ValidationHelper.collectSaveAfter(ValidationHelper.java:98)
    at org.zkoss.bind.impl.BinderImpl.doValidate(BinderImpl.java:1934)
    at org.zkoss.bind.impl.BinderImpl.doCommand(BinderImpl.java:1735)
    at org.zkoss.bind.impl.BinderImpl.access$1300(BinderImpl.java:130)
    at org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent0(BinderImpl.java:1594)
    at org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent(BinderImpl.java:1547)
    at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:3162)
    at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3132)
    at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3074)
    at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138)
    at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1846)
    at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1618)
    at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1321)
    at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:606)
    at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:482)
    at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:490)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)

the beans.Asserts is a simple bean which contains only three properties and getter ,setter.

delete flag offensive retag edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2018-12-05 10:53:38 +0800

Seen: 2 times

Last updated: Dec 05

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More