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

Setting a model to a Chosenbox causes a NullPointerException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.0.1
    • 8.0.0
    • None
    • Security Level: Jean
    • None
    • ZK 8.0.1
    • None

      Steps to reproduce

      1. run attached zul
      2. click "add chosenbox" button

      Actual result

      9:10:55,476 INFO [stdout] (default task-15) java.lang.NullPointerException: null 
      19:10:55,477 INFO [stdout] (default task-15) at org.zkoss.zkmax.zul.Chosenbox.getOptionId(Chosenbox.java:503) ~[zkmax-8.0.1.FL.20151019-Eval.jar:8.0.1] 
      19:10:55,477 INFO [stdout] (default task-15) at org.zkoss.zkmax.zul.Chosenbox.prepareItems(Chosenbox.java:631) ~[zkmax-8.0.1.FL.20151019-Eval.jar:8.0.1] 
      19:10:55,477 INFO [stdout] (default task-15) at org.zkoss.zkmax.zul.Chosenbox.prepareData(Chosenbox.java:574) ~[zkmax-8.0.1.FL.20151019-Eval.jar:8.0.1] 
      19:10:55,477 INFO [stdout] (default task-15) at org.zkoss.zkmax.zul.Chosenbox.onInitRender(Chosenbox.java:784) ~[zkmax-8.0.1.FL.20151019-Eval.jar:8.0.1] 
      19:10:55,477 INFO [stdout] (default task-15) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45] 
      19:10:55,477 INFO [stdout] (default task-15) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45] 
      19:10:55,477 INFO [stdout] (default task-15) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45] 
      19:10:55,477 INFO [stdout] (default task-15) at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45] 
      19:10:55,477 INFO [stdout] (default task-15) at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2989) ~[zk-8.0.1.FL.20151019-Eval.jar:8.0.1] 
      19:10:55,477 INFO [stdout] (default task-15) at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2919) ~[zk-8.0.1.FL.20151019-Eval.jar:8.0.1] 
      19:10:55,477 INFO [stdout] (default task-15) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) ~[zk-8.0.1.FL.20151019-Eval.jar:8.0.1] 
      19:10:55,477 INFO [stdout] (default task-15) at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1822) ~[zk-8.0.1.FL.20151019-Eval.jar:8.0.1] 
      19:10:55,477 INFO [stdout] (default task-15) at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1607) ~[zk-8.0.1.FL.20151019-Eval.jar:8.0.1] 
      19:10:55,477 INFO [stdout] (default task-15) at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1317) ~[zk-8.0.1.FL.20151019-Eval.jar:8.0.1] 
      19:10:55,477 INFO [stdout] (default task-15) at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:611) [zk-8.0.1.FL.20151019-
      

      Debug info

      • this issue doesn't happen in ZK 7
      • When setting a model for a Listbox, Grid, and Combobox, no such issue happens. You can click other buttons in the attached zul.

            DevChu DevChu
            hawk hawk
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h