Announcement

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

    ValuesManager.saveData() results a fetch request rather than update request

    Browser: Firefox 3.6.6
    SmartClient version: Isomorphic SmartClient Framework (SC_SNAPSHOT-2010-08-31/EVAL Deployment 2010-08-31)

    We have a situation where a call to saveData() in a ValuesManager object under the covers becomes a fetch where it should be an update. It also puts the updated values in the Criteria map rather than the Values map where it belongs. It doesn't always happen but, given the right circumstances, it is consistent.

    Here's a small part of the log where things do not look right. I'm including a server log snippet from a successful run followed one from by a non-successful run. Note that, when things are correct, the operation type is an update and when things are wrong, it's a fetch.

    One thing you should know: the HONO field is the primary key and the HBYR field is what's being updated.

    Example when things are working properly:
    Code:
    === 2010-09-28 14:59:54,903 [0-12] DEBUG RPCManager - Request #1 (DSRequest) payload: {
        criteria:{
            HONO:"LG0008"
        },
        values:{
            HBYR:"LG",
            HONO:"LG0008",
            SelectedTerms:[
            ]
        },
        operationConfig:{
            dataSource:"PoHeader",
            operationType:"update"
        },
        componentId:"isc_ValuesManager_0",
        appID:"builtinApplication",
        operation:"member(F003)",
        oldValues:{
            HHND:"AAAAAAAA",
            HCTN:0,
            HCLO:false,
            HRNO:0,
            HACT:null,
            HBLK:"LG0008",
            HBYR:"LD",
            HFDG:"2",
            HACY:null,
            LandedCostReceived:0,
            HSAP:false,
            "H##3":"TEMP1",
            HOP2:false,
            HADF:false,
            HADI:new Date(1280818800000),
            HTI4:null,
            HSOF:false,
            HTI3:null,
    Example when things are not working properly:
    Code:
    === 2010-09-29 08:33:06,250 [85-3] DEBUG RPCManager - Request #1 (DSRequest) payload: {
        criteria:{
            HBYR:"LG",
            HONO:"LG0008",
            SelectedTerms:[
            ]
        },
        operationConfig:{
            dataSource:"PoHeader",
            operationType:"fetch"
        },
        componentId:"isc_ValuesManager_0",
        appID:"builtinApplication",
        operation:"member(F003)",
        oldValues:{
            HHND:"AAAAAAAA",
            HCTN:0,
            HCLO:false,
            HRNO:0,
            HACT:null,
            HBLK:"LG0008",
            HBYR:"LD",
            HFDG:"2",
            HACY:null,
            LandedCostReceived:0,
            HSAP:false,
            "H##3":"TEMP1",
            HOP2:false,
            HADF:false,
            HADI:new Date(1280818800000),
            HTI4:null,
            HSOF:false,
            HTI3:null,
    Thanks!

    Larry

    #2
    Do you see operationType:"fetch" in the RPC tab in the Developer Console? If so, it's a client-side issue, otherwise, it's a server-side issue.

    What's "member(F003)" - is that an operationId you defined? Do you happen to have two DataSources with the same operationId used for an operationBinding?

    Comment


      #3
      Your second point may be the issue. Yes, we have two data sources utilizing the same operation Id. If you take a look at http://forums.smartclient.com/showthread.php?t=12839 you can see a discussion with you guys about what we were doing. Basically, we've been using the operationId to carry a required piece of information to the server. If this is causing the problem, certainly we'll have to come up with another solution. Maybe we could prefix our content with the data source name or something else to make it unique.

      Thanks.

      Comment


        #4
        That seems to have been it. I've taken steps to ensure that the operation id is unique and the problem has gone away.

        Thanks for your help.

        Comment

        Working...
        X