0

これが私のextjs 4.2.1データストアです:

Ext.define('APP.store.CompanyStore', {
extend  : 'Ext.data.Store',
requires: 'APP.model.Company',
model   : 'APP.model.Company',
proxy: {
        type    : 'ajax',
        url     : 'searchP.html',
        actionMethods :{read:'POST'},
        reader  : {
            type: 'json',
            root: 'items'
       }
}

Submit に対する私のアクションは次のとおりです。

    var pname   = Ext.getCmp('pname ').getValue();
    var SearchObj   = Ext.getCmp('searchForm').getValues();
    SearchObj.pname =pname;
    var store = Ext.getStore('APP.store.CompanyStore');
    store.load({
        params:{
            "SearchObj"  :Ext.encode(SearchObj)
        },
        callback: function(records, operation, success) {
            // the operation object
            // contains all of the details of the load operation
            console.log(records);
        }
    });

私の問題 :

オブジェクトは、Spring コントローラーのサーバー側で定義された POJO にマップされていません。何が問題なのですか。

私の春のコントローラー:

@RequestMapping(value = "/searchP", method = RequestMethod.POST)

    public @ResponseBody String searchP(@RequestBody Company company){

            System.out.println("pname"+company.getPName()); //getting null.Not getting actual value.

            return "item";

    }
4

0 に答える 0