1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    3
    Vote Rating
    0
    h.martiker is on a distinguished road

      0  

    Default Create new Model

    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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,644
    Vote Rating
    899
    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


    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 @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