PDA

View Full Version : [FIXED] Configuring a list with emptyText defined causes an Error



lylepratt
13 Nov 2011, 11:28 AM
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:



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:


{
xtype: 'list',
id: 'testList',
cls: 'test_list_container',
store: 'TestStore',
emptyText: 'Test Empty Text' // this breaks it
}

mitchellsimoens
13 Nov 2011, 2:04 PM
Thank you for the report.

Jamie Avins
15 Nov 2011, 10:42 AM
Fixed several issues with emptyText, this will be part of the next release.

Surykat
29 Nov 2011, 1:02 AM
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)?

Jamie Avins
29 Nov 2011, 8:54 AM
The next PR (PR3).

bweiler
13 Dec 2011, 8:14 AM
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.

John2011
20 Jan 2012, 2:26 AM
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.

Jamie Avins
20 Jan 2012, 8:49 AM
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.