extjs5 - Extjs Store Getting Data from Post -


good morning,

i have search endpoint works when call this:

ext.ajax.request({     url: '/search/false',     method: 'post',     headers: { 'content-type': 'application/json' },     params: 'attribute:closeddt;value:2014-12-16',     success: function(conn, response, options, eopts) {         alert(conn.responsetext);     },     failure: function(conn, response, options, eopts) {         alert(conn.responsetext);     } }); 

i want use proxy load store directly. after googling have tried , post /search/false?_dc=1418738135737 net::err_empty_response

see current code below:

var proxydefinition = {     type : 'rest',     api : {         read : '/search/false'     },     actionmethods : {         read    : 'post'     },     reader : {         type : 'json'     },     paramsasjson:true        };  returnvalue = ext.create('ext.data.store', {     model: 'mdl1',     proxy: proxydefinition }); returnvalue.load({params: 'attribute:closeddt;value:2014-12-16'}); 

the params config needs object, not string. extjs encode because of paramsasjson: true.

you should use:

    params: { attribute: 'closedt', value: '204-12-16' } 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -