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

      0  

    Question FormPanel submit GET = no parameters?

    FormPanel submit GET = no parameters?


    Hey All,

    I'm working on a formpanel that when the submit button is pressed, would make a GET request to an api to get content back. The problem seems to be that when I submit as a GET, none of the form values are appended to the URL. If I make it a POST request, the values get sent to the server.

    Any ideas as to why this isn't working?

    I've tried changing the standardSubmit variable, and adding the form values via the params option, as well as try and let them get pulled from the form during submit (as they appear to do via debug).

    I've debugged down into the Sencha code and it appears to get the params, urlencode them, but never adds them to the url.

    In debugging, it seems to be something associated with the params passed in at the app form submit level not being pushed into the subsequent Ajax request call made in the FormPanel submit function.

    in debug_with_comments: 40425, any param data is being munged into the rawData param sent in, which is never getting sent/ appended to the url in the Ajax request code when a GET method is used.

    I think I can get around it by making my own Ajax call there, but I wanted to see if this was a bug, or if this was as designed for the formpanel submit.

    code used to make the call below.

    Thanks in advance!

    Code:
    lmnav.views.startPanel = Ext.extend(Ext.form.FormPanel, {
        padding: 0,
        cls: 'start-form',
        url: '/api/nav/route',
        
        initComponent: function() {
            Ext.apply(this, {
                items: [
                    {
                        xtype: 'fieldset',
                        cls: 'start-fieldset',
                        defaults: {
                            required: true,
                            labelAlign: 'left'
                        },
                        items: [
                            {
                                xtype: 'textfield',
                                name: 'ogn',
                                label: 'From',
                                value: 'Ferry Building, San Francisco, CA'
                            },
                            {
                                xtype: 'textfield',
                                name: 'dst',
                                label: 'To',
                                value: '24 Willie Mays Plaza, San Francisco, CA'
                            },
                        ]
                    },
                    {
                        xtype: 'button',
                        text: 'Take Me There',
                        ui: 'action',
                        handler: function(){
                            console.log(this.getValues())
                            this.submit({ 
                               method: "GET",
                               params: this.getValues()
                            })
                        },
                        scope: this
                    }
                ],
                listeners : {
                    submit : function(form, result){
                        console.log('success', Ext.toArray(arguments));
                    },
                    exception : function(form, result){
                        console.log('failure', result);
                    }
                }
            });
            
            lmnav.views.startPanel.superclass.initComponent.apply(this, arguments);
        }   
    });
    Ext.reg('startPanel', lmnav.views.startPanel);

  2. #2
    Sencha User
    Join Date
    Jun 2011
    Posts
    18
    Vote Rating
    0
    Akrion is on a distinguished road

      0  

    Default


    I am having similar issue and would LOVE to get some feedback from the Dev team.

    Thanks in advance!

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