PDA

View Full Version : Accessing data in Store and posting it back to server using POST



webfriend13
26 Mar 2012, 12:27 AM
HI All,

I am using ExtJs 4.0 and using MVC. In one of view I have certain text fields and combo box which is filled by user. When user clicks on a button, I read all this value and send it to a helper file which creates a string utilizing all the values (read from controls). I have a store with a proxy which should post this data to the server and then must get loaded with the response back.

I am not sure how to access this string in the store (the string is available in controller) & I am calling the load method of the store in the controller. This load method should post the data on the server and must get loaded with the response it receives from server.


Thanks in advance

mitchellsimoens
26 Mar 2012, 7:47 AM
You can send it as a parameter in the load method

webfriend13
27 Mar 2012, 10:45 PM
Ext.Ajax.request({
url: myUrl,
method: 'POST',
//Send the query as the message body
jsonData: jsonStr,
params: {
uid : 'testUser'
},

This is how you post data within message body. content of jsonStr will be posted as body.