0

I have a checkbox grid and a button. When you push the button i want to insert the selected rows data to my db.

The checkbox part i succeed and i get the rows out but i cant figure hout how to insert that data to my db.

I know it is something very simple but i am stuck on it for days and cant figure it out from the docs or google.

var temp = '';
for (i=0; i<=checkboxSelection.length-1; i++){
    temp = temp + checkboxSelection[i].get('vendor_name') + ",";
}
alert(temp);

This is my Store:

var v_url = 'GetBiddingRows.jsp';
store:  Ext.create('Ext.data.Store', {
                fields:[
                {name: 'stat_data', type: 'Date' , sortType: 'asDate', format: 'Y-m-d h:M:s'},
                {name: 'operator_desc'},
                {name: 'vendor_name'},
                {name: 'currency'},
                {name: 'rate', type: 'float', sortType: 'asFloat'}
                ],
                proxy: {
                    type: 'ajax',
                    timeout: 120000,
                    url: v_url,
                    reader: {
                        type: 'json',
                        root: 'data',
                        successProperty: 'success'
                    }
                },
                autoLoad: true
            }),

How do i pass the var temp to the GetBiddingRows.jsp?

4

1 回答 1

3

您可以使用 Ajax 请求将其发送到服务器:

Ext.Ajax.request({
    url: 'foo',
    params: {
        vendors: temp
    }
});
于 2013-08-26T11:28:58.247 回答