1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    17
    Vote Rating
    1
    rutzmic is on a distinguished road

      0  

    Default Unanswered: Uprading DataView to new Touch 2.1 List

    Unanswered: Uprading DataView to new Touch 2.1 List


    Hi,

    i`m trying to upgrade my DataView to the new Sencha Touch 2.1 List.
    In my old DataItem i had 2 components. One indicating some Statusinfo and the other displaying Model information using a Ext.Label. The label uses a XTemplate.
    The updateRecord Method was overriden to apply Model Data to the Label.
    In 2.0 this was working very well. But now i upraded to Touch 2.1, extended my List from the new Ext.List and also changed from DataItem to ListItem.
    After doing so almost nothing works anymore! Not only is my custom styling totally messed up (i think i can fix this), but even worse, it seems that there is no itemtap event triggered anymore!
    Does anyone experiencing similar issues?

    My old DataItem`s config basically looked like this:

    config: {
    status: {
    cls:'status'
    },

    label: {
    cls:'short',
    flex:1,
    tpl: new Ext.XTemplate('...some templating with conditions and a member function...')
    },

    layout: {
    type: 'hbox'
    }
    },

    updateRecord: function(record) {
    this.callParent([record]);
    this.getLabel().updateRecord(record);
    },



    applyStatus: function() {
    return Ext.factory(config, Ext.Component, this.getStatus());
    },

    applyLabel: function() {
    return return Ext.factory(config, Ext.Component, this.getLabel());
    },

    updateStatus: function(newStatus, oldStatus)
    {
    if(oldStatus) {
    this.remove(oldStatus);
    }

    if(newStatus) {
    this.insert(1, newStatus);
    }
    },

    updateLabel: function(newLabel, oldLabel)
    {
    if(oldLabel) {
    this.remove(oldLabel);
    }

    if(newLabel) {
    this.insert(2, newLabel);
    }
    }

    So my biggest issue is not getting itemtap events anymore.

    Do i have to add my Components to the new body?
    Is there a way to just use my template in body? I`ve tried adding my existing template to the body config, but nothing happend...


    Any help appreciated!

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,522
    Answers
    3447
    Vote Rating
    814
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    A simple list with listitem is firing the itemtap for me.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    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 services@sencha.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.

Thread Participants: 1

Tags for this Thread