Announcement

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

    Regression issue with ValuesManager, savedata and callback not being called

    SmartGWTPro5.0.

    We upgraded a couple of days back, from 5.0-p20151012 to 5.0-p20160119 and we discovered an issue with ValuesManager. it seems it no longer calls the callback being sent in to savedata.
    Would be great if you could look at it, it's messing up our product.

    example of save method being called from a "save" button:
    Code:
    private ValuesManager manager = new ValuesManager();
    -----
    private boolean saveData(final Popup popup) {
        if (!manager.validate()) {
            switchToTabWithFirstError(manager.getErrors());
            return false;
            }
    
        final SuccessfulOperationCallbackHandler saveCallbackHandler = new SuccessfulOperationCallbackHandler() {
            @Override
            public void handleSuccessfulCallback(DSResponse response, boolean shouldReloadData) {
                //doing lots of neccessary stuff here, the callback never gets called in the january build!
                popup.destroy();
            }
        };
        DSRequest req = new DSRequest();
    
        req.setWillHandleError(true);
           MyDSCallback callback = new MyDSCallback() {
            @Override
            public void doExecute(DSResponse dsResponse, Object o, DSRequest dsRequest) {
                int status = dsResponse.getStatus();
                if (status != DSResponse.STATUS_SUCCESS) {
                    if (status == MyWebErrorCodeEnum.CID_MISSING.getId()) {
                        FormItem item = form1.getForm().getItem(MyClientServerConstants.FIELD_LEDGER);
                        if (item == null || !((CheckboxItem) item).getValueAsBoolean()) {
                            NubaCommonConstants.showErrorWindow(errorheader, errorheader, null);
                            return;
                        }
                    }
                    MyCommonConstants.handleServerRelatedError(dsResponse);
                } else {
                    saveCallbackHandler.handleSuccessfulCallback(dsResponse, false);
                }
            }
        };
        manager.saveData(callback, req);//THIS USED TO RESULT IN MY CALLBACK BEING CALLED
        return true;
      }
    We've gone back and forth in our Tomcat deploy, just switching out the jar files, and it works in the old build, but not in the new. doExecute is never called.

    (Of course, since it works in the "old" build, i do get a proper response back with status 0 etc.:
    Code:
    //isc_RPCResponseStart-->[{affectedRows:0,data:{variousfields...},invalidateCache:false,isDSResponse:true,operationType:"update",queueStatus:0,status:0}]//isc_RPCResponseEnd

    #2
    We were not able to reproduce this problem. So we are going to need a test case that reproduces this problem so that we can test it.

    Moreover, the problem could be that your server is returning an error with the newer version, rather than there being a problem with the ValuesManager callback per se.

    Regards
    Isomorphic Software

    Comment


      #3
      Just to follow up on this.
      1. to be clear: we reproduced the error by uploading the different jar versions into our /lib directory on the tomcat server and restarted, to make sure that the smartgwt code was the only thing changed.

      2. we got the error by updgrading from 20151012 -> 20151211. We then saw the error and reverted. to 20151012.

      We are now running with 20160121, and in that build, the issue, whatever it is, seems to be fixed. It now works again.


      I agree that it might be something else that caused this, however it could not be seen in the rpc logs, they look the same in all versions. Anyway, it works now....

      Comment

      Working...
      X