Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Chart ChartPointClickHandler smart gwt pro 4.0 - event.getRecord() is null

    Dear Forum!

    Interactive charting is not working!

    GWT 2.5.x
    smartgwt pro edition 4 -nighty build (smartgwtee-4.0d) from 26.2.2013
    operation system: Windows 7
    Browser: ALL
    problem: click on chart => event.getRecord() is null
    problem2: public String hoverHTML(Float value, Record record) { RECORD IS NULL

    if you run the "interactive chart" showcase with the smartgwt 4d edition from 26.2.2013, its not working, the method to get data at a click on the chart is not working, the record is null.

    Because of the fact, that I can refere to the existing 3.1 showcaswe "interactive chart" I do not upload a fully source here.

    I really would like to ask the smart gwt team to reply, because this is a serious problem.

    I try to implement a click point handler in a line chart. I is a bug, because there is no way I can influence this behaviour

    what ever I do, the event.getRecord() delivery a null record.

    Did anybody have the same problem?

    It happens on all browsers (testet with IE and Fireforx)

    Click of chart point => event.getRecord() is NULL
    ---------------------------------------------------

    - it happens also on charts, which are not zoomable
    - it happens regardless if I use multipe series

    // mouse over
    chart.setPointHoverCustomizer(new ChartPointHoverCustomizer() {
    public String hoverHTML(Float value, Record record) {
    =>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> RECORD IS ALWAYS NULL
    ....
    }
    });

    // Setting chart point click handler
    chart.setPointClickHandler(new ChartPointClickHandler() {
    public void onPointClick(ChartPointClickEvent event) {
    // Saving reference to record we are editing, for ease of updating
    Record rec=event.getRecord();
    =>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> RECORD rec IS ALWAYS NULL
    }
    });


    the exception is:

    10:32:26.803 [ERROR] [fleetmanagement] uncaught

    java.lang.NullPointerException: null
    at at.swman.fms.client.charts.SpeedChartView$2.onPointClick(SpeedChartView.java:77)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
    at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)
    at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    at java.lang.Thread.run(Unknown Source)



    br
    Markus
    Last edited by swman; 7 Mar 2013, 05:23. Reason: more infos was added, because the tech support asked me to do it

    #2
    Not reproducible in IE 8 on Windows 7, or in Firefox or Chrome, in the SmartGWT 4.0d Pro build dated 2013-03-06.
    Last edited by Isomorphic; 6 Mar 2013, 15:04.

    Comment


      #3
      TEST with smartgwtee-4.0d from 6.3.13

      Dear Support,

      I dit some test with the "same app", I just replaced:
      - smartgwt.jar
      - smartgwtee.jar
      - smartgwt-skins.jar

      I tried it with smartgwtee-4.0d from 26.3.2013:
      ----------------------------------------------------------
      IE 9: whole app was not workking
      Firefox : whole app was not workking
      Exception: too much recursions at the loading

      object(302), JavaScript object(297), JavaScript object(1250)]): too much recursion
      A detailed exception is added at the end of this mesage



      I tried it with smartgwtee-4.0d from 5.3.2013:
      ----------------------------------------------------------
      IE 9: Chart was not loaded- Exception with set Style
      Firefox: Char was loading, record in the click event was null


      I tried it with smartgwtee-4.0d from 2.3.2013:
      ----------------------------------------------------------
      IE 9: Chart was loaded- record was null in the click event
      Firefox: Chart was loaded- record was null in the click event

      I tried it with smartgwtee-4.0d from 26.2.2013:
      ----------------------------------------------------------
      IE 9: Chart was loaded- record was null in the click event
      Firefox: Chart was loaded- record was null in the click event



      Could you please run your test as well with e.g. the version from the 26.2. or tell me the build to be used

      I have attaced a screenshot to show the debugging result after click on a point of the chart

      Thank you for your reply





      firefox exception by using the version from 6.3.2013:
      ---------------------------------------------------

      14:08:31.112 [ERROR] [fleetmanagement] uncaught
      com.google.gwt.core.client.JavaScriptException: (InternalError) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript object(302), JavaScript object(297), JavaScript object(1250)]): too much recursion
      at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
      at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
      at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
      at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
      at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
      at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
      at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)
      at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
      ...
      Attached Files
      Last edited by swman; 7 Mar 2013, 05:27. Reason: added exception

      Comment


        #4
        We're not sure why, after being told 3.6.2013 is working fine, you would test 4 random other versions.

        For future reference, at any given time, the latest nightly build is the only relevant one.

        Regardless, ALL of these failures suggest botched installation, for example, forgetting to run a GWT compile after changing .jars, stale or multiple copies of .jars in the classpath, still having some files cached in the browser from a previous version, or similar issues.

        Every time a nightly build is created, it is automatically deployed and a huge battery of tests is run against it. So we already know that none of the builds mentioned were fundamentally flawed in the ways you've reported.

        Comment


          #5
          too much recursion

          I tried it again with the last build,

          At the moment I cannot even load the chart anymore.

          at the window show methode it crashes.

          if there is a chart involved the software has strange error messages as follows.

          I always:
          - recompile,
          - clear the browser cash, restart the debug server
          - ....


          08:29:27.163 [ERROR]uncaught
          com.google.gwt.core.client.JavaScriptException: (InternalError) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript object(133), JavaScript object(128), JavaScript object(1093)]): too much recursion
          Last edited by swman; 8 Mar 2013, 01:40.

          Comment


            #6
            "too much recursion"; solved , event.getRecord() still null

            Dear Forum,

            build: 7.3.2013

            setClientOnly(false); in the datasource solves the "too much recursions" exception.


            Browser: IE9, Firefox:
            event.getRecord() still null

            Thanks to the support to check this again!

            Comment


              #7
              See previous response: something is wrong with your project, and we listed more possibilities than you've checked.

              Comment


                #8
                ok

                Dear Support,

                OK I give up and will stop asking for a help for this feature. I recomment to our markting to not go for the 4.x pro edition

                Comment


                  #9
                  That doesn't make sense, because whether you use Pro or not, you're still ultimately going to have the solve the problem of why your project is messed up and is producing errors (like stack overflows) that are unrelated to your use of charts.

                  Comment


                    #10
                    not working yet

                    Dear Support,

                    even after we have bought the pro edition and took the build 10.4.2013 its not working.

                    We do not get any exception, the Record objects is simply null.

                    Please post a working example! Our projects is not in a mess, how you called it.

                    As a paying customer I really expext some support now.

                    Comment


                      #11
                      We'd like to solve the problem for you, but the default installation works just fine, and we have no way of knowing what you've done specially in order to break the system.

                      We'd recommend installing from scratch on a clean machine so that you can be completely sure that the default installation works fine. Then you can return to troubleshooting with no question in your mind that the default installation works correctly.

                      Comment


                        #12
                        TEST with showcase also failed

                        Dear Support,

                        I was able to run the showcase sampe (build from 13.4.2013 Version 4.0d)!

                        The bug is stil there:

                        I run DataPointsChart and the hoverHTML mehtod works great. The record object is set.

                        The MeasurementDataZoom runs fine, but the record is NULL!!

                        I added the following code:

                        chart.setShowDataPoints(Boolean.TRUE);
                        chart.setPointHoverCustomizer(new ChartPointHoverCustomizer() {
                        public String hoverHTML(Float value, Record record) {
                        if (record==null) {
                        return ("<b>record is null, but should not</b>");
                        }//end if
                        else {
                        return ("<b>" + record.toString() +"</b>");
                        }
                        }
                        });



                        For me itsproven now that there is a bug in zoomable charts, waht I try to explain since a few week.

                        The bug is in the:
                        chart.setPointClickHandler
                        chart.setPointHoverCustomizer

                        Comment


                          #13
                          Finally, an actual problem. Yes, with the combination of zoom charts and showDataPoints you can get this issue, and it's fixed for tomorrow's builds.

                          Note you'll probably never need this fix, because you probably don't want to use showDataPoints with zoom charts anyway. Zoom charts are for huge data sets so there would be way too many points for it to make sense to visually show each one.

                          Instead, you probably just want to enable showValueOnHover, or use mouseMove in combination with getNearestDrawnValue() to do a custom hover.

                          Comment


                            #14
                            thank you!

                            Comment


                              #15
                              thank you again,

                              its working wonderful after using the build form 16.4.2013 (4.0d pro)

                              Comment

                              Working...
                              X