1. #11
    Ext User
    Join Date
    Jan 2010
    Posts
    5
    Vote Rating
    0
    tsedeke is on a distinguished road

      0  

    Default


    My response for create record show follow:
    Code:
    {"success":true,"message":"Record created","data":[{"adr_id":"16","adr_desc":"Neue Adresse","adr_adress1":null,"adr_address2":null,"adr_zip_code":null,"adr_town":null,"adr_phone":null,"adr_fax":null,"adr_mail":null,"adr_web":null,"adr_default":"0","sup_id":"9"}]}

  2. #12
    Sencha User khebs@live.com's Avatar
    Join Date
    Mar 2008
    Posts
    83
    Vote Rating
    0
    khebs@live.com is on a distinguished road

      0  

    Default


    I see, so if you have encountered an error along the way, for example on grid, you should push/trigger an Exception not by returning (success: false), anyway thanks, i know Ext.Direct is not that yet well tested..
    Last edited by khebs@live.com; 12 Feb 2010 at 6:57 PM. Reason: Wrong Spelling ^^

  3. #13
    Sencha User
    Join Date
    Feb 2008
    Location
    Palu, Indonesia
    Posts
    7
    Vote Rating
    0
    xp743 is on a distinguished road

      0  

    Default


    Try change your json response from :
    PHP Code:
    "data":[{"adr_id":"16","adr_desc":"Neue Adresse","adr_adress1":null,"adr_address2":null,"adr_zip_code":null,"adr_town":null,"adr_phone":null,"adr_fax":null,"adr_mail":null,"adr_web":null,"adr_default":"0","sup_id":"9"}] 
    to :
    PHP Code:
    "data":{"adr_id":"16","adr_desc":"Neue Adresse","adr_adress1":null,"adr_address2":null,"adr_zip_code":null,"adr_town":null,"adr_phone":null,"adr_fax":null,"adr_mail":null,"adr_web":null,"adr_default":"0","sup_id":"9"
    And to get all message working :
    PHP Code:
    Ext.data.DataProxy.on({
          
    'beforewrite':{fn:function(){your func show message before send data to write}},
          
    'write':{fn:function(){your func show message after do write success true /false}},
          
    'exception':{fn:function(){your func show message when your json message first array with : {"type":"exception",etc}}},
    }) 
    all my settings like above work well for me with Directsore+restful+phpMVC(ORM)