View Full Version : How to update store via View and Vise Versa using Xtemplate

17 Oct 2013, 2:11 AM
I have two Views(Panel).
First Panel contain following components:
1. Radio Button
2. Text Field
3. Done and Cancel Buttons

Second Panel contain following components:
1. Check box
2. Button Group


Whenever I click radio button of first panel, text box should become editable and whatever i write on text box it should get updated in the store.
Updated data of the store should reflect on the text of button component of second panel too.

Please suggest how to implement the above scenario via Xtemplate or the best possible solution for the same.


Gary Schlosberg
21 Oct 2013, 9:49 AM
Duplicate of Premium thread (which had some helpful images). Answer posted there:

Depending on how invested you are in the XTemplate solution you described, you might consider using a grid-based solution, something involving checkcolumn, celleditor plugin, and an actioncolumn. Either way you will need to wire some things up yourself to get it working, but it might be easier to use existing framework widgets. Using a grid, you'd have to create the disabled look yourself using a renderer on the cell editor decorating the cell based on the checkcolumn state. Probably need beforeedit listeners on the edit cell to disallow unless it is not checked, and a cell click listener on the grid to catch the 'Done' button and sync the store.