PDA

View Full Version : List of Object from ExtJS to Service(Spring)



chetan.nellekeri
26 Aug 2013, 4:29 AM
Hi,

I am using Extjs and Spring framework to develope the application.
Consider an EmployeeStore of EmployeeModel.
Let consider EmployeeModel define below parameters
empFName
empLname
empAge
empSalary
...

Now how do I send List of Employee Object from ExtJS to Spring using POST method?? Please advice

aaugen
26 Aug 2013, 11:53 PM
Hi,

For send data to spring controllers or others you can use ajax request with specific url and params attribute like this:


Ext.Ajax.request({
url: 'yoururl',
params:
paramName1: paramValue1,
paramName2: paramValue2,
...
}
});

An other possibilty is to use FormPanel to create fields with specific name and use submit method on form to send data.
Look at this in documentation for more explains:
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.Basic-method-submit