1. #1
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    55
    Vote Rating
    0
    bodyboarder20 is on a distinguished road

      0  

    Default DirectProxy - paramsAsHash - Array w/ object inside?

    DirectProxy - paramsAsHash - Array w/ object inside?


    Hey guys,

    So I noticed something very strange.

    Im using a model w/ a directproxy (paramsAsHash=true), and when I attempt to update, the JSON being sent to the server doesn't appear to be formatted correctly.

    Code:
    [{
         "action":"InstallationGateway",
         "method":"get",
         "data":[{
              "id":12,
              "page":1,
              "start":0,
              "limit":25}],
         "type":"rpc",
         "tid":1
    }]
    It seems to me that if paramsAsHash is set to true, then the value of data should be an object NOT an array with the 1st element an object.

    The reason I say this is that now on the server side, in my router, I have to check (isArray(data) && ArrayLen(data) == 1 && IsStruct(data[0])....

    its not very elegant... Would be MUCH more elegant to just look and see if the value of data is an array or a struct.

    Thoughts? Is this normal behavior that I'm seeing?

    Thanks!

  2. #2
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    55
    Vote Rating
    0
    bodyboarder20 is on a distinguished road

      0  

    Default


    It looks as tho I fell at the knife of out of date documentation.

    After digging into Ext.direct.RemotingMethod, and finding that rather than specifying "len", I can specify "params" and provide an array of parameter names; once I made this fix to my API generation, life was good and happy.

    The documentation needs to be updated to reflect this capability. The Ext Direct specification still states that named arguments are not supported.... and paramsAsHash doesnt say anything about what is necessary to make that work properly either.

  3. #3
    Ext Premium Member
    Join Date
    Aug 2008
    Location
    San Rafael, CA
    Posts
    31
    Vote Rating
    0
    JGALFO is on a distinguished road

      0  

    Default


    I was having a similar issue. See http://www.sencha.com/forum/showthre...l=1#post717906

    I tried using the param array as you suggested but the filtering and sorting did not work. See my other thread... it seems to me that it might be a bug.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar