Announcement

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

    ListGrid.fetchOperation is sent properly, but hidden in RPC manager

    Hi,

    I have a ListGrid, for which I set a custom operation using ListGrid.setFetchOperation().

    When the ListGrid fetches, it does the proper thing.

    Quoting the server log:

    Code:
    === 2011-02-24 05:23:22,585 [0-24] DEBUG RPCManager - Request #1 (DSRequest) payload: {
        criteria:{
            source_id:"1"
        },
        operationConfig:{
            dataSource:"whatever_auto",
            operationType:"fetch",
            textMatchStyle:"exact"
        },
        startRow:0,
        endRow:75,
        componentId:"isc_SimpleListGrid_2",
        appID:"builtinApplication",
        operation:"REL_fetch",
        oldValues:{
            source_id:"1"
        }
    }
    As you can see, there is operation:"REL_fetch", so it's working.

    Viewing the same call in the RPC manager, the reported RPCRequest looks like this:

    Code:
    {
        "actionURL":"http://127.0.0.1:8888/cogdemo/sc/IDACall", 
        "showPrompt":true, 
        "prompt":"Finding Records that match your criteria...", 
        "transport":"xmlHttpRequest", 
        "promptStyle":"cursor", 
        "bypassCache":true, 
        "data":{
            "criteria":{
                "source_id":"1"
            }, 
            "operationConfig":{
                "dataSource":"whatever_auto", 
                "repo":null, 
                "operationType":"fetch", 
                "textMatchStyle":"exact"
            }, 
            "startRow":0, 
            "endRow":75, 
            "componentId":"isc_SimpleListGrid_2", 
            "appID":"builtinApplication", 
            "operation":"REL_fetch", 
            "oldValues":{
                "source_id":"1"
            }
        }
    }
    We have "operation":"REL_fetch", so it's good.

    However, the DSRequest (according to the RPCManager) looks like this:

    Code:
    {
        "dataSource":"whatever_auto", 
        "operationType":"fetch", 
        "componentId":"isc_SimpleListGrid_2", 
        "data":{
            "source_id":"1"
        }, 
        "startRow":0, 
        "endRow":75, 
        "textMatchStyle":"exact", 
        "resultSet":[ResultSet ID:isc_ResultSet_2 (created by: isc_SimpleListGrid_2)], 
        "callback":{
            "caller":[ResultSet ID:isc_ResultSet_2 (created by: isc_SimpleListGrid_2)], 
            "methodName":"fetchRemoteDataReply"
        }, 
        "willHandleError":true, 
        "showPrompt":true, 
        "prompt":"Finding Records that match your criteria...", 
        "oldValues":{
            "source_id":"1"
        }, 
        "clientContext":{
            "requestIndex":2
        }, 
        "requestId":"whatever_auto$6276"
    }
    As you can see, our custom operation id is not mentioned here.

    And also, in the list of calls in RPC history, the Operation is simply displayed as "fetch", and not as "fetch<REL_fetch>", as it's supposed to.

    Would you please look into this?

    Thank you:

    Csillag

    ps. I am using the 02.23 nightly.
    ps. When investigating this problem, see also this bug report about dev console's RPC manager.

    #2
    Here is a test case for this.

    Code:
    public class FetchOperationTester implements EntryPoint {
    
    final static String DS_NAME = "whatever";
    
    @Override public void onModuleLoad() {
        DataSource.load(DS_NAME, new Function() { 
    	@Override public void execute() { run(); }
        }, false);
    }
    
    public static void run() {
        ListGrid grid = new ListGrid();
        grid.setDataSource(DataSource.get(DS_NAME));
        grid.setFetchOperation("customFetch");
        grid.fetchData();
        SC.showConsole();
    }
    	
    }
    (Just set DS_NAME to any available datasource, it does not matter.)

    If you check the RPC calls in the shown dev console, you can see that the custom operation ID is not shown in the history list and in the DSRequest, but is present in the RPC request.
    Last edited by csillag; 24 Feb 2011, 12:21.

    Comment


      #3
      Originally posted by csillag
      Here is a test case for this.
      Added a small fix to the code. (It was stupid to edit it in the submit form.)

      Comment


        #4
        This should be fixed in the next nightly build.

        Regards
        Isomorphic Software

        Comment


          #5
          Originally posted by Isomorphic
          This should be fixed in the next nightly build.
          Great! Will the same modification fix the other RPC manager bug, too?

          Comment


            #6
            Tested with the 03.03. nightly, and it works great now.

            Thank you.

            Csillag

            Comment

            Working...
            X