Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-1027
in
a recent build.
-
Touch Premium Member
Configuring a list with emptyText defined causes an Error
REQUIRED INFORMATION
Sencha Touch version tested:
Browser versions tested against:
- Safari
- Chrome
- Mobile Safari
DOCTYPE tested against:
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
}
-
Thank you for the report.
-
Fixed several issues with emptyText, this will be part of the next release.
-
Sencha User
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)?
-
-
Sencha User
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.
-
Sencha User
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.
-
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.