1. #1
    Sencha User
    Join Date
    Sep 2008
    Posts
    193
    Vote Rating
    0
    fxmisticat is on a distinguished road

      0  

    Default Help setting store Data call..

    Help setting store Data call..


    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',
        
    autoLoadtrue,
        
    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..

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,330
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    What does your response look like?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Sep 2008
    Posts
    193
    Vote Rating
    0
    fxmisticat is on a distinguished road

      0  

    Default


    response to from the DWR call was put at the bottom of the post... I didnt know how to expand the PHP section to make it bigger??

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,330
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    That's not an array, json, or xml so that means you will need a custom reader then also
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Sep 2008
    Posts
    193
    Vote Rating
    0
    fxmisticat is on a distinguished road

      0  

    Default


    I got it working. using a custom ready in a proxy....

    thanks!

Thread Participants: 1

Tags for this Thread