3 Jul 2012 10:52 AM #1
Unanswered: databinding for lists and forms
Hey guys, im kind of new to sencha touch 2 and i am trying to dynamically update a list and a form with data. First i want to read in a list and i want to update the UI list with everything from the data. Second when i click "details" on my list item i want to update a form that corresponds with the data from that certain list item, what is the best way to do this and do you guys have any examples? Thanks!
Edit: i figured out how to do it for the lists anyone got any tips on the form? I dont know the syntax well but i assume i think id need something like "get view, get name? set place holder" thats my thought process but im not sure what to do .
5 Jul 2012 4:37 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
use the setRecord method on the form passing in the record you want to edit. When you want to "submit" the form you simple execute the updateRecord method in the form and it will update the record which the list should reflect this change automatically.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
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 firstname.lastname@example.org
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.