1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    6
    Vote Rating
    0
    gpepus is on a distinguished road

      0  

    Default Ext Direct with ExtDirectSpring [Ralscha] (Problem getting Id after save of new form)

    Ext Direct with ExtDirectSpring [Ralscha] (Problem getting Id after save of new form)


    Dear Colleagues:
    My workmates and I have implemented the ExtDirectSpring classes (by Ralscha) which are very straightforward. We are fully able to create, update and read data vis-a-vis a grid and/or a grid plus a form.

    On Java we have a POJO and a Service that writes the data to a database via MyBatis - works great. In Ext we seem to be able to use a form to save data .. but we have never been able to get the ID back from a newly created record and have it automatically shown in a form (this is implied by Direct) - NOTE: we can see the updated ID in a grid but only by doing a store.load(){function(){} ... etc. But of course in a form we want to get an updated copy of the model back so we can update the form and do the next step.

    In Firebug we see the updated JSON come back from ExtDirectSpring .. but we don't ever see the record (model) in the DOM get updated with the new ID even though its in the returned JSON shown in firebug.

    So we are VERY confused and VERY concerned. We have got to be missing something. There has got to be a way to get the updated JSON information basck into the model so we can use it to do the next thing .. otherwise we are going to have to find a different front-end solution.


    Please somebody help.
    Thanks
    Greg

    PS. Is Ext on the client side expecting return values to appear as {success: true, records
    {0 .. model
    .1 .. model
    2 .. model
    etc
    }}

    what happens if it comes back with success: true and shows results: { records { yada yada }

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Vote Rating
    850
    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


    So when you submit a form, the response sends back the id? Do you handle the response?
    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.

Thread Participants: 1