Results 1 to 3 of 3

Thread: Binding models and forms

  1. #1
    Ext GWT Premium Member
    Join Date
    Jan 2010
    Posts
    74
    Vote Rating
    0
      0  

    Default Binding models and forms

    What is the correct way of binding a model to a form's components (i.e. a text box) ?

    I want to be able to set the bindings, populate the model and then have the components show the data from the model field to which they have been bound.

    I am hoping this will be a two way binding so that the change in the component is pushed back into the model. I can then validate the model when the save button is tapped.

    I have looked at all of the getting started guides and they all rely on the view instantiating a specific model instance and binding that instance to the form's fields but this is not what I am able (or want) to do.

    Any help or guidance appreciated.

    BOb

  2. #2
    Sencha Premium User mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    693
    Vote Rating
    12
      0  

    Default

    you can fill a form with model data with setRecord()

    http://docs.sencha.com/touch/2-0/#!/...thod-setRecord

  3. #3
    Ext GWT Premium Member
    Join Date
    Jan 2010
    Posts
    74
    Vote Rating
    0
      0  

    Default

    Thanks for the reply, but that method needs a model instance to populate with. Bindings should work without the need for a specific instance to be instantiated.

Posting Permissions

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