1. #1
    Sencha User
    Join Date
    May 2011
    Posts
    2
    Vote Rating
    0
    ulinkwo is on a distinguished road

      0  

    Default ExtJS Query Param Format

    ExtJS Query Param Format


    Hi , i am a newbie for ExtJS , I use struts2 and ExtJS in my project . when post query params to the server side , the struts2 can not receive the params.
    for example , I want to post the param like this :
    Code:
    {name : 'kyle' , age : 12}
    so I set the proxy :
    Code:
    proxy.extraParam.person = {name : 'kyle' , age : 12}
    then the extjs post query string format like : person=kyle&person=12,here "extraParam" cant be set a complex object ? i want to receive the query string format like "person.name=kyle&person.age=12"

    what can I do ?

    Thanks,

    Kyle

  2. #2
    Sencha User
    Join Date
    Apr 2010
    Posts
    78
    Vote Rating
    1
    kskrumpet is on a distinguished road

      0  

    Default


    You can encode the complex object, and decode it on the other end.

    someproxy.extraParams.person = Ext.encode({name: 'bob', age: 99});

    Rich
    http://wintermedia.co.uk/extjs-consultancy

Thread Participants: 1