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.
  1. #1
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    224
    Vote Rating
    3
    XASD is on a distinguished road

      0  

    Default 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:
    Code:
    {
        xtype: 'list',
        store: 'mystore',
        defaultType: 'myitemtype',
        useComponents:true,
        listeners:{
            itemtap:function(s, index,target, record){
                record.set('name','newname');
            }
        }
    
    }
    2) list item:
    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');
        }
    });
    It seems updateRecord() problem.

    Thanks.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,714
    Vote Rating
    438
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    224
    Vote Rating
    3
    XASD is on a distinguished road

      0  

    Default


    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.

  4. #4
    Sencha Premium Member
    Join Date
    Oct 2012
    Location
    Brisbane, QLD, Australia
    Posts
    32
    Vote Rating
    2
    ampro is on a distinguished road

      0  

    Default


    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.