Announcement

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

    setAttributeAsJavaObject error in Firefox

    Hello,
    These are the framework used and their versions:
    1. SmartGWT version: v9.1p_2014-05-31/LGPL Development Only (built 2014-05-31)
    2. GWT version: 2.6.0
    3. Mozilla Firefox version: 26.0
    I also tried with other SmartGWT and GWT versions but the problem persists.

    I've seen from your docs that in the latest versions you added a method called setAttributeAsJavaObject which sets a Java object into a Record without being transformed to JS. Nice feature by the way which opens new doors to explore for me.
    The problem is that if I call the editRecord method for a record that contains such an attribute I get an error even if the record's attribute isn't edited in the Dynamic form.
    This error is shown only in development mode in Firefox and if I comment the setAttributeAsJavaObject line the error disappears but I can not enjoy the new feature.

    How to reproduce the problem:
    Just click a record from the treeTable.

    Please find attached the test case that reproduces the problems.
    Attached Files

    #2
    There is nothing to be noticed in my post? This is a real problem because you can't develop in firefox if this problem persists.

    Also it seems that is another bug but this time when the application is deployed in production mode regarding the same setAttributeAsJavaObject property. But let's take them in turn.

    Comment


      #3
      We were only able to see the issue in Development Mode - it didn't reproduce in Production Mode for us. However, we've made a fix specific to GWT Java Objects that should apply to both situations. It will be in the next nightly builds of SGWT 5.0d and 4.1p.

      Comment


        #4
        Thank you

        Yes you are right and as I previously said this error appears only in development mode. Thank you very much for solving it.

        In the meantime I found another problem regarding the setAttributeAsJavaObject which only appears when the application is BUILT and DEPLOYED (not in development). I haven't tried to make a test case but I found where the problem is:

        Code:
        DSResponse response = new DSResponse();
        									response.setData(toTreeNode(modifiedTask));
        									response.setOperationType(DSOperationType.ADD);
        									updateCaches(response);
        This code resides in a datasource, the same as the one from the previous testcase. What I found is that when the DSOperationType is ADD and the setAttributeAsJavaObject is set then the data (response.setData()) doesn't make changes to the datasource.
        If the DSOperationType is UPDATE or REMOVE everything works as expected.

        Hope it helps. If not please tell me in order to create a test case if I can.

        Best regards,
        Andrei

        Comment


          #5
          Since you're using transforms and custom data protocol, can you provide the repro code for the issue (similar to your first sample) so we're sure what you're referring to?

          Comment


            #6
            Ok. Then hopefully I will come back monday with a test case that reproduces this problem. Thank you again for your professionalism.

            Comment


              #7
              Another bug with setAttributeAsJavaObject

              Hi again,

              Trying to create a testcase for the last problem I noticed, I stumbled across another bug which is very similar with the first one from this thread (when using the setAttributeAsJavaObject I get an error). Also it is reproduced only in development mode on Mozilla (on IE works ok).

              These are the framework used and their versions:
              1. SmartGWT version: v9.1p_2014-06-14/LGPL Development Only (built 2014-06-14)
              2. GWT version: 2.6.0
              3. Mozilla Firefox version: 26.0

              You can reproduce the problem by clicking the Add button. I also attached the test case.

              Regarding the previous problem I will try to create a test case with IE and hopefully show it to you guys.

              Best regards,
              Andrei
              Attached Files

              Comment


                #8
                setAttributeAsJavaObject not working in production

                Originally posted by Isomorphic View Post
                Since you're using transforms and custom data protocol, can you provide the repro code for the issue (similar to your first sample) so we're sure what you're referring to?
                I finally managed to recreate the problem in a test case. As I mentioned this is happening only in production mode so in order to recreate on your side you have to get the test case from my previous post from today, embed it in a project, run a GWT compile on that project, copy all the files and folders from the war folder in a tomcat folder and run the tomcat. When the application is loaded in the browser click the Add button and you will see that nothing happens. In development mode everything works ok.

                Cheers,
                Andrei

                Comment


                  #9
                  Originally posted by slick07 View Post
                  I finally managed to recreate the problem in a test case. As I mentioned this is happening only in production mode so in order to recreate on your side you have to get the test case from my previous post from today, embed it in a project, run a GWT compile on that project, copy all the files and folders from the war folder in a tomcat folder and run the tomcat. When the application is loaded in the browser click the Add button and you will see that nothing happens. In development mode everything works ok.

                  Cheers,
                  Andrei
                  We do see this (your production mode crash), though only with GWT 2.5.0 and newer. (So using GWT 2.4.0 would be a workaround.) The next nightly builds of SGWT should have the fix.

                  Comment


                    #10
                    Originally posted by slick07 View Post
                    Hi again,
                    Trying to create a testcase for the last problem I noticed, I stumbled across another bug which is very similar with the first one from this thread (when using the setAttributeAsJavaObject I get an error). Also it is reproduced only in development mode on Mozilla (on IE works ok).
                    This issue appears to have the same cause as the other (just mentioned). The fix should address both.

                    Comment


                      #11
                      Thank you very much and I am glad that I could give a hand in making this framework better :)

                      Comment

                      Working...
                      X