I am migrating from 2.2 to 4 and have created the MVC app. Everything loads except for the data in the store that I created (using DWRProxy).
PHP Code:
Ext.define('Rubicon.model.Trade', {
extend: 'Ext.data.Model',
fields: [
{name: 'tradeid', mapping: 'tradeId', type : 'float'},
.....
.....
....
]
});
Ext.define('Rubicon.store.TradeBlotter', {
extend: 'Ext.data.Store',
model: 'Rubicon.model.Trade',
autoLoad: true,
proxy: {
type: 'dwr',
dwrFunction:BlotterProxy.getTrades,
reader: {
root: 'trades',
totalProperty:'tradeCount'
}
}
});
looking in firebug, I looked at Ext.StoreManager.Item[1]
$className"Rubicon.store.TradeBlotter"
but the data.Items=[0]??
PHP Code:
Ext.define('Rubicon.view.Grid' , {
extend: 'Ext.grid.Panel',
alias : 'widget.tradeblotter',
title : 'Trade Blotter',
store: 'TradeBlotter',
columns: [{
header: 'TradeId',
dataIndex: 'tradeid'
},
...
...
...
]
});
I also see my DWR call and get data back
PHP Code:
throw 'allowScriptTagRemoting is false.'; //#DWR-INSERT //#DWR-REPLY var s8=new BlotterResponse();var s0=new SpotFwdTrade();var s2=new TradeLeg();var s3=new SpotFwdTrade();var s4=new TradeLeg();var s6=new SpotFwdTrade();var s5=new TradeLeg();var s7=new SpotFwdTrade();var s1=new TradeLeg();s8.todaysTradeCount=4;s8.tradeCount=4;s8.trades=[s0,s3,s6,s7]; s0.ccy1="AUD";s0.ccy1Amount=-10000.0;s0.ccy1Side="SELL";s0.ccy2="USD";s0.ccy2Amount=10714.4;s0.ccyPair="AUD/USD";s0.clientOrderId="9576f645-a8b6-4866-91c1-9af7acc1cb60";s0.comments=null;s0.cpartyId="demo.order";s0.cpartySubId="TESTBTTP1";s0.currency="AUD";s0.externalTradeId="5297b7b9-f43d-4999-be18-76e9fb717f23";s0.internalTrade=true;s0.productType="SPOT";s0.refId=12104707492159228;s0.source="ITG";s0.tradeBook="AUTO";s0.tradeDate="2012-02-14";s0.tradeId=12104707490700228;s0.tradeLeg=s2;s0.tradeStatus="ALLOCATED";s0.traderUserId="FX Ecomm AUTO";s0.transactTime="23:37:09.000"; s2.allInRate=0.0;s2.amountBought=10714.4;s2.amountSold=10000.0;s2.ccyBought="USD";s2.ccySold="AUD";s2.fillRate=1.07144;s2.forwardPoint=0.0;s2.settlDate="2012-02-13";s2.side="SELL";s2.spotRate=1.07144; s3.ccy1="AUD";s3.ccy1Amount=10000.0;s3.ccy1Side="BUY";s3.ccy2="USD";s3.ccy2Amount=-10714.0;s3.ccyPair="AUD/USD";s3.clientOrderId="9576f645-a8b6-4866-91c1-9af7acc1cb60";s3.comments=null;s3.cpartyId="MS";s3.cpartySubId="MS";s3.currency="AUD";s3.externalTradeId="5297b7b9-f43d-4999-be18-76e9fb717f23";s3.internalTrade=false;s3.productType="SPOT";s3.refId=12104707490700228;s3.source="ITG";s3.tradeBook="AUTO";s3.tradeDate="2012-02-14";s3.tradeId=12104707492159228;s3.tradeLeg=s4;s3.tradeStatus="ALLOCATED";s3.traderUserId="FX Ecomm AUTO";s3.transactTime="23:37:09.000"; s4.allInRate=0.0;s4.amountBought=10000.0;s4.amountSold=10714.0;s4.ccyBought="AUD";s4.ccySold="USD";s4.fillRate=1.0714;s4.forwardPoint=0.0;s4.settlDate="2012-02-13";s4.side="BUY";s4.spotRate=1.0714; s6.ccy1="AUD";s6.ccy1Amount=-1000000.0;s6.ccy1Side="SELL";s6.ccy2="USD";s6.ccy2Amount=1071140.0;s6.ccyPair="AUD/USD";s6.clientOrderId="e4f48d05-e455-40a3-97b8-883d22414bfa";s6.comments=null;s6.cpartyId="demo.order";s6.cpartySubId="TESTBTTP1";s6.currency="AUD";s6.externalTradeId="44a3bf60-4452-4c1a-9616-1c5ae0828423";s6.internalTrade=true;s6.productType="SPOT";s6.refId=12104745717313228;s6.source="ITG";s6.tradeBook="AUTO";s6.tradeDate="2012-02-14";s6.tradeId=12104745717279228;s6.tradeLeg=s5;s6.tradeStatus="ALLOCATED";s6.traderUserId="FX Ecomm AUTO";s6.transactTime="23:37:47.000"; s5.allInRate=0.0;s5.amountBought=1071140.0;s5.amountSold=1000000.0;s5.ccyBought="USD";s5.ccySold="AUD";s5.fillRate=1.07114;s5.forwardPoint=0.0;s5.settlDate="2012-02-13";s5.side="SELL";s5.spotRate=1.07114; s7.ccy1="AUD";s7.ccy1Amount=1000000.0;s7.ccy1Side="BUY";s7.ccy2="USD";s7.ccy2Amount=-1071100.0;s7.ccyPair="AUD/USD";s7.clientOrderId="e4f48d05-e455-40a3-97b8-883d22414bfa";s7.comments=null;s7.cpartyId="MS";s7.cpartySubId="MS";s7.currency="AUD";s7.externalTradeId="44a3bf60-4452-4c1a-9616-1c5ae0828423";s7.internalTrade=false;s7.productType="SPOT";s7.refId=12104745717279228;s7.source="ITG";s7.tradeBook="AUTO";s7.tradeDate="2012-02-14";s7.tradeId=12104745717313228;s7.tradeLeg=s1;s7.tradeStatus="ALLOCATED";s7.traderUserId="FX Ecomm AUTO";s7.transactTime="23:37:47.000"; s1.allInRate=0.0;s1.amountBought=1000000.0;s1.amountSold=1071100.0;s1.ccyBought="AUD";s1.ccySold="USD";s1.fillRate=1.0711;s1.forwardPoint=0.0;s1.settlDate="2012-02-13";s1.side="BUY";s1.spotRate=1.0711; dwr.engine.remote.handleCallback("3","0",s8);
any help will be greatly appreciated..