Announcement

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

    DSCallback no longer called after upgrade

    After upgrading SmartGWT to latest version 2.1 (from google repository) and upgrading the GWT to 2.0.3, the DSCallback is no longer called. Is there a known issue with the SmartGWT 2.1 that prevents the DSCallback from working properly ? The code worked perfectly with SmartGWT 1.1 and older version of GWT.


    Code:
    		ds.fetchData(null,new DSCallback() {
    			public void execute(DSResponse response,Object rawData,DSRequest request) {
    				SC.say("test");
    			}
    		});
    Last edited by mitekphoto; 16 Apr 2010, 12:48.

    #2
    It is in fact broken in all versions above 1.1; the DSCallback is not called when fetchData is called directly on the datasource. The last version where this works properly is 1.1.

    Another curious thing, with the SmartGWT version 2.1 the project compile time jumps from 2.5 min to almost 5 min, that is, it's twice as long !

    Reverting to the last stable version, 1.1, until things improve.

    D.

    Comment


      #3
      Uhh mitekphoto.. everyone is using this feature without issues and it works fine in the showcase. You should investigate this as a problem unique to your project, probably a mistake in installation somewhere.

      Comment


        #4
        It's good to hear that it works for everyone else. However, for us it never did, and it will be an easier solution to just use the 1.1 jar for the time being. Besides, it cuts the compile time in half. 2.1 compilation time of 5 min was just unacceptable, and this was already with several browsers disabled in gwt-user.

        Comment


          #5
          That too (compilation time) isn't typical. Possibly the two are related to the same problem in your development environment.

          Comment


            #6
            I can concur with mitekphoto that after upgrading to version 2.1 DSCallback is no longer being called.

            In fact I see the SUCCESS status being sent from Developer Console with the correct response from the server but its NEVER reaching my execute code:

            Code:
            _taskList.updateData(r,new DSCallback()
            {
            	public void execute(DSResponse resp,java.lang.Object rawData,DSRequest request)
            	{									
                             _te.destroy();
            
            	}
            });

            Pretty basic stuff. And I'm using SmartGWT 2.1 with GWT 2.0.3

            Comment


              #7
              This happens only in hosted mode, right? This is a known issue, possibly an issue with GWT itself. "star" this issue to get notified. This is a high priority issue and is being looked into.

              Sanjiv

              Comment


                #8
                No it seems to be happening when I deploy the app as well. Let me know if you need any other information to help track it down.

                Comment


                  #9
                  Unable to reproduce. I verified that the callback gets invoked as expected against SVN. Please provide a standalone testcase or modification to a Showcase example that illustrates this. Also try using a nightly build and see if you're seeing the same behavior.

                  Sanjiv

                  Comment


                    #10
                    This happens in normal browser mode

                    > This happens only in hosted mode, right?

                    no, I never even tried hosted mode. This happens in normal browser mode.

                    basically, anything beyond 1.1, DSCallback is broken. Using GWT 2.0.3, latest version. Not sure what to think of that, I noticed this problem months ago, and it prevented me from going up the version, because the new jar file broke the existing code. Tried to upgrade lately, same thing, it seems that the bug persisted throughout multiple releases.

                    Comment


                      #11
                      What are you all using as your DataSource?

                      Comment


                        #12
                        The following code works in SmartGWT 1.1 and under, but is broken in the later versions, due to the fact that execute() method in the DSCallback is never called.

                        Code:
                        		ds.fetchData(null,new DSCallback() {
                        			public void execute(DSResponse response,Object rawData,DSRequest request) {
                        				SC.say("test");
                        			}
                        		});
                        Turns out that in SmartGWT version 1.2 and higher, the first parameter cannot be null. Replacing it with a dummy criteria solves the issue:

                        Code:
                        		ds.fetchData(new Criteria(),new DSCallback() {
                        			public void execute(DSResponse response,Object rawData,DSRequest request) {
                        				SC.say("test");
                        			}
                        		});
                        There is absolutely no reason, why criteria should not be allowed to be null. This must have been a refactoring bug introduced in SmartGWT 1.2 and remaining there since.

                        Why do I think it's a veritable bug: simply because it breaks the backward-compatibility with the earlier versions of SmartGWT. With this bug still in the framework, the upgrade can no longer be a simple smartgwt jar replacement, as it would be otherwise.

                        I wish one of the SmartGWT gurus here would have pointed out this simple thing to me earlier -- now, it looks like such an obvious thing. Hopefully, the information here will be useful to somebody else.
                        Last edited by mitekphoto; 6 Dec 2010, 07:40.

                        Comment


                          #13
                          Unable to reproduce this will the latest nighties. It look a datasource in the Showcase sample and invoked ds.fetchData(..) passing a null criteria and it worked fine. Please post a minimal standalone testcase if you think there's still a bug.

                          Sanjiv

                          Comment

                          Working...
                          X