Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>you're using JsonStore &amp; passing a reader object to it but jsonStore gets config of a JsonReader &amp; creates a reader itself. you have 2 choices: </p> <ol> <li>use <code>Ext.data.Store</code> for <code>V2020.dsPricing</code></li> <li>move configs of your JsonReader to JsonStore &amp; don't pass reader to JsonStore anymore</li> </ol> <p>solution 1:</p> <pre> var url = "http://localhost/r.json"; objPricingReturn = {serviceId:10}; function PricingJsonReader() { var pricingReaderObject = new Ext.data.JsonReader({ root: 'GetServicePriceByIdResult.ServicePricing', fields: [{ name: 'priceId', type: 'int' }, { name: 'serviceId', type: 'int' }, { name: 'price', type: 'float' }, { name: 'startDate', type: 'date', dateFormat: 'n/j/Y' }, { name: 'endDate', type: 'date', dateFormat: 'n/j/Y' }, { name: 'updatedBy', type: 'string' }, { name: 'updateDate', type: 'date', dateFormat: 'n/j/Y' }] }) return pricingReaderObject; } V2020 = {}; V2020.dsPricing = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ method: 'POST', url: url, headers: {"Content-Type": "application/json; charset=utf-8"}, jsonData: Ext.util.JSON.encode({ serviceId: objPricingReturn.serviceId }) }), reader: PricingJsonReader() }); V2020.dsPricing.on('loadexception', function(obj, options, response, err) { Ext.MessageBox.show({ title: 'Error', msg: url + ' POST method fail...ErrorCode:' + response.status, buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.ERROR }); }); V2020.dsPricing.load({ callback: function(records, o, s) { if (!s) Ext.MessageBox.show({ title: 'Error', msg: ' Failed to load pricing data', buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.ERROR }); } }); </pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload