20 Mar 2012 10:56 AM #1
Unanswered: Newbie: Update View/Panel data dynamically on tap of item on the Dataview
I am trying to build IPad Application using Sencha Touch 2.0.
On the left side I have List of items, and on tap of item I need to render the respective information on the right side detail container.
On the RHS, the container consists of titlebar with action buttons and Segemented Button component. So ontap on the item, I want to display respective information and on each of the button clicks in the Segemented button group it shall render related information w.r.t selected item in the list.
So in this scenario;
1.Here, Is it necessary to create new instance of the view each and every time ontap of the items or only requires to update the data because representation will be same for the items but only the data shall be change?
2.And how can I dynamically update the RHS detail container ontap of the intended item on the LHS?
20 Mar 2012 10:59 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
If the component on the right is going to have the same HTML structure you can give the component a tpl and then on itemtap you can use setData on the component on the right and that should fill the template with data.Mitchell Simoens @LikelyMitch
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 email@example.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.
20 Mar 2012 8:55 PM #3
Thanks for your quick response.
Do you any example related to this?
One more thing,
I have a Main panel where I used card layout with animation slide, direction left and items in the Main Panel are TitleBar, TabPanel, and Panel in that panel I have used HBar layout to get the separation on LHS my dataview and on RHS my the detail container. But when I tap on item animation slide is not working.
Note: Till now I didn't try it on IPad. I am still in Chrome.