1. #1
    Sencha User pablotcarreira's Avatar
    Join Date
    Feb 2012
    Location
    Brazil
    Posts
    11
    Vote Rating
    3
    pablotcarreira is on a distinguished road

      0  

    Default How to change filter encoding / override json proxy?

    How to change filter encoding / override json proxy?


    Hi, I want to change the how the filter are encoded in a request. Extjs4 encode filters like that:

    Code:
    ?filter=[{"property":"foo","value":bar}]
    but I want the filters to come directly:
    Code:
    ?foo=bar
    My best guess is to override the proxy's encodeFilters function.
    I need help because I couldn't manage to override the proxy inside Architect because it's nested inside a model.

    Any help on how to do that? Is there a simpler way?

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,198
    Vote Rating
    119
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Are you looking for simpleGroupMode or simpleSortMode?
    http://docs.sencha.com/ext-js/4-1/#!...impleGroupMode
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha User pablotcarreira's Avatar
    Join Date
    Feb 2012
    Location
    Brazil
    Posts
    11
    Vote Rating
    3
    pablotcarreira is on a distinguished road

      0  

    Default


    It's something like to have simpleGroupMode enabled, but instead of a direction it must send a parameter and a value for filtering.

    Example:
    I would like to ask the server for students with age of 10, that way:
    http://myurl.com/api/v1/students/?age=10

    But Extjs make the filtering like stated bellow and I don't want that:
    http://myurl.com/api/v1/students/?filter=[{'property':'age', 'value':10}]

    thx
    Last edited by pablotcarreira; 25 Jul 2012 at 4:28 AM. Reason: smiles

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,198
    Vote Rating
    119
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    This is a good feature request for the SDK team. There should be a similar configuration to send those params over the wire.

    You could implement that with an override (globally as an override). And then add the new configuration to the individual proxy you want to do it. Alternatively you could override all Server proxies to send filters in your preferred manner.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Sencha User pablotcarreira's Avatar
    Join Date
    Feb 2012
    Location
    Brazil
    Posts
    11
    Vote Rating
    3
    pablotcarreira is on a distinguished road

      0  

    Default


    Is there a way to override a proxy from inside Architect? I could only manage to override the model or the store, but not the proxy...

  6. #6
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,198
    Vote Rating
    119
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    There is not a way to create a subclass/override of your individual proxy but you can create an override that will do it for all proxies.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi