Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14693] BlackBerry: No header text on TableViewSection

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-06-05T19:51:27.000+0000
Affected Version/sRelease 3.1.2
Fix Version/s2013 Sprint 16, 2013 Sprint 16 API, Release 3.3.0
ComponentsBlackBerry
Labelsqe-3.3.0, qe-closed-3.1.2, qe-nfc, qe-port, qe-testadded, sdk-bb
ReporterLokesh Choudhary
AssigneePedro Enrique
Created2013-07-30T00:21:34.000+0000
Updated2014-06-17T23:33:25.000+0000

Description

Description: 1. Create a BB app with the following code:

Titanium.UI.setBackgroundColor('#000');

var tabGroup = Titanium.UI.createTabGroup();

var win1 = Titanium.UI.createWindow({  
    title:'Test 1',
    backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'Test 1',
    window:win1
});

var table = Ti.UI.createTableView({
    width: Ti.UI.FILL,
    height: Ti.UI.FILL,
    data: [
           {title: 'row 1', header: 'section 1', subHeader: 'sub header of section 1'},
           {title: 'row 2'},
           {title: 'row 3'},
           {title: 'row 4'},
           {title: 'row 5'},
           {title: 'row 1', header: 'section 2'},
           {title: 'row 2'},
           {title: 'row 3'},
           {title: 'row 4'},
           {title: 'row 5'},
           {title: 'row 1', header: 'section 3'},
           {title: 'row 2'},
           {title: 'row 3'},
           {title: 'row 4'},
           {title: 'row 5'},
           {title: 'row 1', header: 'section 4', subHeader: 'sub header of section 4'},
           {title: 'row 2'},
           {title: 'row 3'},
           {title: 'row 4'},
           {title: 'row 5'},
           {title: 'row 1', header: 'section 5'},
           {title: 'row 2'},
           {title: 'row 3'},
           {title: 'row 4'},
           {title: 'row 5'}
           ]
});
 
win1.add(table);

var win2 = Titanium.UI.createWindow({  
    title:'Test 2',
    backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({  
    icon:'KS_nav_ui.png',
    title:'Test 2',
    window:win2
});

var d = [];
for(var i = 0; i < 10; i++) {
    var section = Ti.UI.createTableViewSection({
        title: 'Hello section number ' + i,
        subTitle: 'This is a subtitle for section #' + i
    });
     
    for(var a = 0; a < 10; a++) {
        section.add(Ti.UI.createTableViewRow({
            title: 'Section #' + i + ' Row #' + a
        }));
    }
    d.push(section);
}
 
var table1 = Ti.UI.createTableView({
    width: Ti.UI.FILL,
    height: Ti.UI.FILL,
    data: d
});
 
win2.add(table1);

tabGroup.addTab(tab1);  
tabGroup.addTab(tab2);  

tabGroup.open();
2. Build & run on BB device/simulator 3. Go To test 2 tab. 4. Look at the header for sections Actual result: 1. We do not see the headers for sections instead we get header same as the subTitle. This happens only for Ti.UI.createTableViewSection not for Ti.UI.createTableView

Comments

  1. Lokesh Choudhary 2013-07-30

    We see this behaviour for alloy apps too.
  2. Pedro Enrique 2013-07-30

    PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/140
  3. Federico Casali 2013-08-09

    Verified fixed with the provided classic project sample in the description. Alloy sample project
       <Alloy>
           <Window id="win" backgroundColor="white">
               <TableView id="table">
                   <TableViewSection id="sectionFruit" title='Title!' subTitle='Sub Title!'>
                       <TableViewRow title="Apple"/>
                       <TableViewRow title="Bananas"/>
                   </TableViewSection>
                   <TableViewSection id="sectionVeg" headerTitle="Vegetables">
                       <TableViewRow title="Carrots"/>
                       <TableViewRow title="Potatoes"/>
                   </TableViewSection>
                   <TableViewSection id="sectionFish" headerTitle="Fish">
                       <TableViewRow title="Cod"/>
                       <TableViewRow title="Haddock"/>
                   </TableViewSection>
               </TableView>
           </Window>
       </Alloy>
       
    Titanium SDK 3.1.2.v20130808180613 Alloy 1.2.0-alpha6 Appcelerator Studio 3.1.2.201308071912 CLI 3.1.2-alpha Node 0.10.13 Closing.
  4. Samuel Dowse 2013-11-13

    Verified fixed on: Mac OSX 10.9 Mavericks Titanium Studio, build: 3.2.0.201311122225 Titanium SDK, build: 3.2.0.v20131113094843 CLI: 3.2.0 Alloy: 1.3.0 BlackBerry Simulator: 10.2.0.1791 Code from description and code provided by Federico. Table view shows header text, subheader text and tablerow text. Closing.
  5. Olga Romero 2014-06-03

    Tested with: Mac osx 10.9.3 Mavericks Appcelerator Studio, build: 3.3.0.201405271647 Titanium SDK, build: 3.3.0.v20140603032057 Node.JS Version: v0.10.13 NPM Version: 1.3.2 acs@1.0.14 alloy@1.4.0-beta npm@1.3.2 titanium@3.3.0-beta2 titanium-code-processor@1.1.1 Device: BB Z10 (10.2.1) and encountered the original issue. Reopened.
  6. Pedro Enrique 2014-06-05

    PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/262
  7. Olga Romero 2014-06-10

    Tested and verified fixed with: Mac osx 10.9.3 Mavericks Appcelerator Studio, build: 3.3.0.201406061445 Titanium SDK, build: 3.3.0.v20140609184912 Node.JS Version: v0.10.13 NPM Version: 1.3.2 acs@1.0.14 alloy@1.4.0-beta npm@1.3.2 titanium@3.3.0-beta2 titanium-code-processor@1.1.1 Device: BB Z10 (10.2.1) Table view shows header text, subheader text and tablerow text.

JSON Source