Announcement

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

    Values not getting submitted to server with 8.0

    Hi,

    I am trying out 8.0. And, I am seeing a problem where values are not getting submitted to the server. I tried a beta version of 8.0 a few months ago and this did not happen.


    Here is an example of how we add certain values to every request

    Code:
    	var statusDS = isc.DataSource.getDataSource("StatusOptions");
    	statusDS.addMethods({
        transformRequest : function (dsRequest) {
    	
    
           var params = {
                  cvsTag : cvsTag,
                  browser:BrowserDetect.browser,
                  browserVersion:BrowserDetect.version,
                  browserOS:BrowserDetect.OS,
    	      requestUserID: currentUserID,
                  departmentID: currentUserDepartmentID,
                  companyID: currentUserCompanyID
               };
          return isc.addProperties({}, dsRequest.data, params);
        }
        
    	})
    Then, server side we normally find these params we've added by inspecting either criteria or values from the dsRequest

    Map criteria = (Map) dsRequest.getCriteria();
    Map values = (Map) dsRequest.getValues();

    This is code that has been working correctly on our side for years. Any idea why this is happening with 8.0?

    #2
    That code looks fine, and this is a common use case that appears to be working.

    Can you check:
    1. that transformRequest is being called at all
    2. that your params are actually non-null
    3. what shows in the RPC tab for the request
    4. what shows in the server-side logs for the request

    Comment


      #3
      Hi,

      1. Yes, it is being called.

      2. Yes, they are actually non-null

      3.The RPC tab shows the request and the response from the server. Not sure how to find more about the request itself here though.

      4. the logs show a request being submitted without criteria

      Below is a comparison between what we see in the raw POST data for the dsRequest I grabbed from Firebug in a 6.5.1 version of our app vs 8.0. As you can see, the criteria are there for 6.5.1 and absent for 8.0.

      So, suggestions on how to debug at this point?

      6.5.1
      Code:
      <criteria xsi:type="xsd:Object"><cvsTag>V2-5-0_at_devls,build-5662-01-06-2011</cvsTag><browser>Firefox</browser><browserVersion xsi:type="xsd:double">3.6</browserVersion><browserOS>Windows</browserOS><requestUserID xsi:type="xsd:long">30</requestUserID><departmentID xsi:type="xsd:long">12</departmentID><companyID xsi:type="xsd:long">10</companyID></criteria>
      
      
      <criteria xsi:type="xsd:Object"></criteria>
      8.0
      Code:
      <criteria xsi:type="xsd:Object"></criteria>

      Comment


        #4
        We're trying to figure out whether exactly the criteria are disappearing. Can you show us the actual 3 & 4 rather than describing them?

        Comment


          #5
          3. I'm not really sure what you want me to show you from the RPC tab. The "Request" section never shows any information for me. The Response section show a response coming back from the server complaining about the missing criteria based on our own logic telling the server to throw an exception when these criteria are missing. Can you give me some more details on what you are looking for?

          4. Again, not sure exactly what you are looking for in terms of server side logs. But, we have this logic allowing us to loop over all the criteria for each request server-side:

          Code:
          	Map criteria = (Map) dsRequest.getCriteria();
          	Iterator keyValuePairs = criteria.entrySet().iterator();
          Here is the server-side output for 8.0
          Code:
          2011-01-07 16:07:51,023 INFO  [com.mycompany.controller.SmartClientController] Criteria Submitted for dsName=StatusOptions with uuid=5da619f5-10a9-4e21-8f21-fa8d00bc6c56
          2011-01-07 16:07:51,023 INFO  [com.mycompany.controller.SmartClientController] Finished criteria loop, uuid=5da619f5-10a9-4e21-8f21-fa8d00bc6c56
          Here is the server-side output for 6.5.1
          Code:
          2011-01-07 14:50:10,989 INFO  [com.mycompany.controller.SmartClientController] Criteria loop: uuid=c532863e-bf5b-4902-9466-b16b10d8c1c3
          2011-01-07 14:50:10,989 INFO  [com.mycompany.controller.SmartClientController] Criteria member:0 has key=cvsTag, and value=V2-5-0_at_devls,build-5662-01-06-2011
          2011-01-07 14:50:10,989 INFO  [com.mycompany.controller.SmartClientController] Criteria member:1 has key=browser, and value=Firefox
          2011-01-07 14:50:10,989 INFO  [com.mycompany.controller.SmartClientController] Criteria member:2 has key=browserVersion, and value=3.6
          2011-01-07 14:50:10,989 INFO  [com.mycompany.controller.SmartClientController] Criteria member:3 has key=browserOS, and value=Windows
          2011-01-07 14:50:10,989 INFO  [com.mycompany.controller.SmartClientController] Criteria member:4 has key=requestUserID, and value=30
          2011-01-07 14:50:10,989 INFO  [com.mycompany.controller.SmartClientController] Criteria member:5 has key=departmentID, and value=12
          2011-01-07 14:50:10,989 INFO  [com.mycompany.controller.SmartClientController] Criteria member:6 has key=companyID, and value=10
          2011-01-07 14:50:10,989 INFO  [com.mycompany.controller.SmartClientController] Finished criteria loop, uuid=c532863e-bf5b-4902-9466-b16b10d8c1c3

          I feel like the raw firebug output I sent demonstrates that the request being sent from the browser doesn't include the correct criteria. And, I've confirmed they are being generated correctly in transformRequest(). So, the question I think is what happening in between transformRequest and the POST of data to the server?

          Comment


            #6
            On 3, we just needed an explicit statement that the request pane is blank. You're right, given the Firebug output, 4 was probably not needed.

            We've found and fixed the bug we think is effecting this. Tonight's build also has a fix that could repair your RPC tab (the request tab should never be blank) - please let us know if this is the case as well.

            Comment


              #7
              Sounds good, I'll look forward to trying a new build.

              However, I disabled my transformRequest logic and saw the following error that is blocking me next:

              Code:
              21:26:43.914:TMR2:WARN:Log:TypeError: this.$73w is not a function
                  HTMLFlow.modifyContent()
                  Canvas._completeHTMLInit()
                  Canvas.draw()
                  Class.invokeSuper(_1=>null,  _2=>"draw")
                  Class.Super(_1=>"draw",  _2=>{Obj})
                  HTMLFlow.draw()
                  Layout.layoutChildren("initial draw")
                  Layout.drawChildren()
                  Canvas.draw()
                  Window._matchBodyWidth()
                  Window.layoutChildren("initial draw")
                  Layout.drawChildren()
                  Canvas.draw(true, undef, undef, undef, undef, undef, undef, undef)
                  Class.invokeSuper(_1=>{Obj},  _2=>"draw",  _3=>true,  _4=>undef,  _5=>undef,  _6=>undef)
                  Window.draw(true)
                  Canvas.show(undef, undef, undef, undef, undef, undef, undef, undef)
                  Class.invokeSuper(_1=>{Obj},  _2=>"show",  _3=>undef,  _4=>undef,  _5=>undef,  _6=>undef)
                  Window.show()
                  loginMessageDisplayBody()
                  anonymous()
                  [c]Class.fireCallback(_1=>"loginMessageDisplayBody();",  _2=>undef,  _3=>[object Array],  _4=>[object XPCCrossOriginWrapper],  _5=>true)
                  Timer._fireTimeout("$ir55")
                  unnamed()
                  unnamed()

              Comment


                #8
                There's a patch for that (although the fix is also in nightlies as of a few days ago).

                Comment


                  #9
                  Just want to confirm the issue with transformRequest appears to be fixed with the latest nightly build. We'll continue on with our testing now and post new thread for any other issues we find.

                  Comment

                  Working...
                  X