-
29 Oct 2012 10:25 AM #1
Ext.dataview.component.ListItem does not respect useComponents on record update
Ext.dataview.component.ListItem does not respect useComponents on record update
If I use ListItem with component based layout -'useComponents:true', and try to modify corresponding record, list item dosen't get updated with new values.
But if I use standard approach with "itemTpl", new data get rendered properly respecting store update.
Small sample,store contains field 'name' in records:
1) list:
2) list item:Code:{ xtype: 'list', store: 'mystore', defaultType: 'myitemtype', useComponents:true, listeners:{ itemtap:function(s, index,target, record){ record.set('name','newname'); } } }
It seems updateRecord() problem.Code:Ext.define('aaaaa', { extend: 'Ext.dataview.component.ListItem', xtype: 'myitemtype', config: { dataMap: { getName: { setHtml:'name' }, }, name: true, items: [ { xtype: 'component', itemId: 'name' }, ] }, applyName: function () { return this.child('#name'); } });
Thanks.
-
29 Oct 2012 11:01 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,641
- Vote Rating
- 434
Thanks for the report! I have opened a bug in our bug tracker.
-
30 Oct 2012 1:56 AM #3
Sincerely,I really missing simple declarative two-way binding infrastructure of knockoutjs.
It's binding framework is top notch IMHO-simple and expandable. I'm not sure it could be used in component based framework,but if it can-it should. Sorry,no offense.
Best wishes.
-
2 Dec 2012 8:23 PM #4
Yes you can have two-way binding like Knockout ... it's called GluJS
http://www.conarrative.com/glujs.html
MVVM is way better than MVC and would make Sencha a serious killer framework! Dojo has already started down this path. Sencha's new class model would be a perfect fit for two way binding.
You found a bug! We've classified it as
TOUCH-3634
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote