Results 1 to 2 of 2

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

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    6
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      0  

    Default

    So when you submit a form, the response sends back the id? Do you handle the response?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •