Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1056] Multi tb group tableView fails to render

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionInvalid
Resolution Date2012-06-22T12:16:35.000+0000
Affected Version/sn/a
Fix Version/sSprint 2012-13 API
ComponentsiOS
Labelsapi
Reporterctredway
AssigneeVishal Duggal
Created2011-04-15T02:42:44.000+0000
Updated2017-03-03T22:52:56.000+0000

Description

A customer has an app where he has multiple tab groups. After switching to the second group and then going back the first group, the table view fails to render. Files can be found here:

http://helpdesk.appcelerator.net/tickets/2840">http://helpdesk.appcelerator.net/tickets/2840

Attachments

FileDateSize
resources.zip2011-04-15T02:42:44.000+000028053

Comments

  1. Thomas Huelbert 2011-04-15

    valid, needs testcase

    attached files from original helpdesk ticket. To repro (happens in emulator and device):
    1.launch app, note table
    2.tap "show group 2"
    3. in the resulting window, tap "show group 1"

    results, table view is not shown

  2. Vikramjeet Singh 2011-08-17

    1054 Bug scrub: valid. Test case attached with bug Tested On: Mac OSX Lion TiMob 1.8.0 TiStud: 1.0.4.201108101535 Devices Tested On: iPhone Simulator
  3. Vishal Duggal 2012-06-22

    Bad Code. Here is how you need to write your win1.js
       
       Ti.API.info('win1');
       Ti.include('global.js');
       
       var win = Ti.UI.currentWindow;
       
       var loginButton = Ti.UI.createButton({title:'show group 2', top:0, width:'150', height:'40'});
       
       win.add(loginButton);
       
       // create table view
       var tableViewOptions = {
       	//data:data,
       	top:50,
       	//headerTitle:'Settings',
       	style:Titanium.UI.iPhone.TableViewStyle.GROUPED,
       	backgroundColor:'transparent',
       	rowBackgroundColor:'white'
       };
       
       // create table view
       var tableview = Titanium.UI.createTableView(tableViewOptions);
       win.add(tableview);
       
       function addData() {
       	Ti.API.info('addData');
       	
       	var data = [
       	
       		//{title:'Language', hasChild:true, url:'language.js'},
       		{title:'About', hasChild:true, header:''},
       		{title:'Visit easyMedMobile.com', hasChild:true},
       		{title:'Terms and Conditions', hasChild:true},
       		{title:'Log out', hasChild:true, header:''}
       	];
       	
       	tableview.setData(data);
       }
       
       var event_win1_listener = function(e){
       	Ti.API.info("event_win1");	
       	addData();
       }
       
       if(Titanium.App.Properties.getBool("event_win1") == false) {
       	Titanium.App.Properties.setBool("event_win1", true);
       	Titanium.App.addEventListener('event_win1', event_win1_listener);
       }
       
       
       loginButton.addEventListener('click', function() {
       	Titanium.UI.currentTabGroup.close();
       	Titanium.App.Properties.setBool("event_win1", false);
       	Titanium.App.removeEventListener('event_win1', event_win1_listener);
       	
       	showGroup2();
       	
       	//
       });
       
       Ti.App.fireEvent('event_win1');
       
  4. Lee Morris 2017-03-03

    Closing ticket as invalid

JSON Source