Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1027 in a recent build.
  1. #1
    Touch Premium Member lylepratt's Avatar
    Join Date
    Dec 2010
    Location
    Austin, Texas
    Posts
    159
    Vote Rating
    0
    lylepratt is on a distinguished road

      0  

    Default Configuring a list with emptyText defined causes an Error

    Configuring a list with emptyText defined causes an Error


    REQUIRED INFORMATION

    Sencha Touch version tested:
    • Sencha 2 rev PR2
    Browser versions tested against:
    • Safari
    • Chrome
    • Mobile Safari
    DOCTYPE tested against:
    • HTML5
    Description:
    • Describe the problem in greater detail here, summarizing the behavior.
    If you define a list with the "emptyText" attribute set, things break and this error is produced:

    Code:
    TypeError: 'undefined' is not an object (evaluating 'innerItem.innerHTML = this.getItemTpl().apply(data)')
    Using setEmptyText on initialization seems to work the FIRST TIME, but if you change it again, the same error appears.

    Steps to reproduce the problem:
    • Create a list
    • Define the 'emptyText' attribute
    • load the list and watch it break
    The result that was expected:
    • no errors should appear
    • subsequent alterations of the empty text should work as expected
    The result that occurs instead:
    • defining the list with 'emptyText' breaks the list. Subsequently changing the 'emptyText' with 'setEmptyText' also breaks the list.
    Test Case:
    Code:
    {
       xtype: 'list',
       id: 'testList',
       cls: 'test_list_container',
       store: 'TestStore',
       emptyText: 'Test Empty Text' // this breaks it
    }
    Twitter: lylepratt

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,620
    Vote Rating
    817
    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


    Thank you for the report.
    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.

  3. #3
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    21
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Fixed several issues with emptyText, this will be part of the next release.

    Sencha Inc

    Jamie Avins

    @jamieavins

  4. #4
    Sencha User Surykat's Avatar
    Join Date
    Jul 2011
    Location
    BIALYSTOK, Poland
    Posts
    58
    Vote Rating
    1
    Surykat is on a distinguished road

      0  

    Default


    I'm still having the same error (ST PR2) during calling a .load() method of my store after making into them some changes. Is bug fixed already or would be in ST2 release (not PR)?

  5. #5
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    21
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    The next PR (PR3).

    Sencha Inc

    Jamie Avins

    @jamieavins

  6. #6
    Sencha User
    Join Date
    Apr 2011
    Posts
    212
    Vote Rating
    3
    bweiler is on a distinguished road

      0  

    Default Still getting an error in PR3.

    Still getting an error in PR3.


    I'm still getting the following error after upgrading to PR3:

    TypeError: 'undefined' is not an object (evaluating 'innerItem.innerHTML = this.getItemTpl().apply(data)')

    The error occurs only when there is data for the list. If there is no data for the list, the emptyText message is displayed properly and no error is displayed on the console.

  7. #7
    Sencha User
    Join Date
    Nov 2011
    Posts
    20
    Vote Rating
    0
    John2011 is on a distinguished road

      0  

    Exclamation Problems with emptyText persist in PR3

    Problems with emptyText persist in PR3


    I am get the same error in PR3, additionally the emptyText does not disappear after setting it with setEmptyText() and thenadding items to the list. Setting setEmptyText('') (empty string) or setEmptyText(null) does not have any effect either.

  8. #8
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    21
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    DataView had some restructuring done to better facilitate this for the next release. DataView is now broken into an outer container which handles things like emptyText and an inner container which is created either as a set of managed elements or a set of managed components. Previously emptyText resided within the inner container which was causing problems when it was interacting with the managed elements/components.

    Sencha Inc

    Jamie Avins

    @jamieavins