Results 1 to 2 of 2

Thread: Create new Model

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    3
    Vote Rating
    0
      0  

    Default Create new Model

    Hi all,

    i created a Model and bind it to a form. After I load a new Record (Direct PHP Backend) every fields are filled with the data from Backend.
    Now I create a new Model and call "updateRecord()". Now the Create method of the backend is called and the Data will be stored in Database. I return an Object containing the saved Data and the new ID, generated by the Backend-Database. This value has been set in the Model but the Form won't be updated. Should I reload the Data in the Form by calling loadRecord or is there any other method for Refreshing the Form <-> Model Binding?

    Best Regards

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,336
    Vote Rating
    1297
      0  

    Default

    There is no actual vinding from a model to a form. If the model was updated with some data, you have to update the form.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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.

Posting Permissions

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